IDEMPIERE-3798:Move iDempiere default branch to openjdk 10 (warning deprecated of constructer)

constructer with expression
This commit is contained in:
hieplq 2018-10-24 09:23:59 +07:00
parent 733ad1c89f
commit bb6005c5c2
2 changed files with 12 additions and 12 deletions

View File

@ -545,7 +545,7 @@ public class TableElement extends PrintElement
// Print below existing column // Print below existing column
if (col != dataCol) if (col != dataCol)
{ {
m_columnWidths.add(new Float(0.0)); // for the data column m_columnWidths.add(Float.valueOf((float)0.0)); // for the data column
Float origWidth=null; Float origWidth=null;
try{ try{
origWidth = (Float)m_columnWidths.get(col); origWidth = (Float)m_columnWidths.get(col);
@ -554,14 +554,14 @@ public class TableElement extends PrintElement
log.log(Level.SEVERE, "Column " + dataCol + " below " + col + " - no value for orig width"); log.log(Level.SEVERE, "Column " + dataCol + " below " + col + " - no value for orig width");
else else
{ {
if (origWidth.compareTo(new Float(colWidth)) >= 0) if (origWidth.compareTo(Float.valueOf(colWidth)) >= 0)
{ {
if (log.isLoggable(Level.FINEST)) log.finest("Same Width - Col=" + col if (log.isLoggable(Level.FINEST)) log.finest("Same Width - Col=" + col
+ " - OrigWidth=" + origWidth + " - Width=" + colWidth + " - Total=" + p_width); + " - OrigWidth=" + origWidth + " - Width=" + colWidth + " - Total=" + p_width);
} }
else else
{ {
m_columnWidths.set(col, new Float(colWidth)); m_columnWidths.set(col, Float.valueOf(colWidth));
p_width += (colWidth - origWidth.floatValue()); p_width += (colWidth - origWidth.floatValue());
if (log.isLoggable(Level.FINEST)) log.finest("New Width - Col=" + col if (log.isLoggable(Level.FINEST)) log.finest("New Width - Col=" + col
+ " - OrigWidth=" + origWidth + " - Width=" + colWidth + " - Total=" + p_width); + " - OrigWidth=" + origWidth + " - Width=" + colWidth + " - Total=" + p_width);
@ -571,7 +571,7 @@ public class TableElement extends PrintElement
// Add new Column // Add new Column
else else
{ {
m_columnWidths.add(new Float(colWidth)); m_columnWidths.add(Float.valueOf(colWidth));
p_width += colWidth; p_width += colWidth;
if (log.isLoggable(Level.FINEST)) log.finest("Width - Col=" + dataCol if (log.isLoggable(Level.FINEST)) log.finest("Width - Col=" + dataCol
+ " - Width=" + colWidth + " - Total=" + p_width); + " - Width=" + colWidth + " - Total=" + p_width);
@ -591,7 +591,7 @@ public class TableElement extends PrintElement
rowHeight = (float)dimensions.get(col).height; rowHeight = (float)dimensions.get(col).height;
} // for all columns } // for all columns
rowHeight += m_tFormat.getLineStroke().floatValue() + (2*V_GAP); rowHeight += m_tFormat.getLineStroke().floatValue() + (2*V_GAP);
m_rowHeights.add(new Float(rowHeight)); m_rowHeights.add(Float.valueOf(rowHeight));
p_height += rowHeight; p_height += rowHeight;
} // for all rows } // for all rows
// HeaderRow // HeaderRow
@ -615,7 +615,7 @@ public class TableElement extends PrintElement
{ {
if (log.isLoggable(Level.FINEST)) log.finest("Page Y=1 - PageHeight=" + m_firstPage.height + " - TableHeight=" + p_height); if (log.isLoggable(Level.FINEST)) log.finest("Page Y=1 - PageHeight=" + m_firstPage.height + " - TableHeight=" + p_height);
m_firstRowOnPage.add(new Integer(0)); // Y m_firstRowOnPage.add(new Integer(0)); // Y
m_pageHeight.add(new Float(p_height)); // Y index only m_pageHeight.add(Float.valueOf(p_height)); // Y index only
} }
// multiple pages on Y | Axis // multiple pages on Y | Axis
else else
@ -655,7 +655,7 @@ public class TableElement extends PrintElement
m_firstRowOnPage.add(new Integer(dataRow+addlRows)); // Y m_firstRowOnPage.add(new Integer(dataRow+addlRows)); // Y
if (!firstPage) if (!firstPage)
{ {
m_pageHeight.add(new Float(usedHeight)); // Y index only m_pageHeight.add(Float.valueOf(usedHeight)); // Y index only
if (log.isLoggable(Level.FINEST)) log.finest("Page Y=" + m_pageHeight.size() if (log.isLoggable(Level.FINEST)) log.finest("Page Y=" + m_pageHeight.size()
+ " - PageHeight=" + usedHeight); + " - PageHeight=" + usedHeight);
} }
@ -678,7 +678,7 @@ public class TableElement extends PrintElement
+ ", Row=" + dataRow + ",AddlRows=" + addlRows + ", Height=" + rowHeight + ", Row=" + dataRow + ",AddlRows=" + addlRows + ", Height=" + rowHeight
+ " - Available=" + availableHeight + ", Used=" + usedHeight); + " - Available=" + availableHeight + ", Used=" + usedHeight);
} // for all rows } // for all rows
m_pageHeight.add(new Float(usedHeight)); // Y index only m_pageHeight.add(Float.valueOf(usedHeight)); // Y index only
if (log.isLoggable(Level.FINEST)) log.finest("Page Y=" + m_pageHeight.size() if (log.isLoggable(Level.FINEST)) log.finest("Page Y=" + m_pageHeight.size()
+ " - PageHeight=" + usedHeight); + " - PageHeight=" + usedHeight);
} // multiple Y | pages } // multiple Y | pages
@ -761,12 +761,12 @@ public class TableElement extends PrintElement
int additionalPart = columnWidth * availableWidth / totalWidth; int additionalPart = columnWidth * availableWidth / totalWidth;
if (remainingWidth < additionalPart) if (remainingWidth < additionalPart)
{ {
m_columnWidths.set(col, new Float(columnWidth+remainingWidth)); m_columnWidths.set(col, Float.valueOf(columnWidth+remainingWidth));
remainingWidth = 0; remainingWidth = 0;
} }
else else
{ {
m_columnWidths.set(col, new Float(columnWidth+additionalPart)); m_columnWidths.set(col, Float.valueOf(columnWidth+additionalPart));
remainingWidth -= additionalPart; remainingWidth -= additionalPart;
} }
if (log.isLoggable(Level.FINEST)) log.finest(" col=" + col + " - From " + columnWidth + " to " + m_columnWidths.get(col)); if (log.isLoggable(Level.FINEST)) log.finest(" col=" + col + " - From " + columnWidth + " to " + m_columnWidths.get(col));
@ -779,7 +779,7 @@ public class TableElement extends PrintElement
int columnWidth = ((Float)m_columnWidths.get(c)).intValue(); int columnWidth = ((Float)m_columnWidths.get(c)).intValue();
if (columnWidth > 0) if (columnWidth > 0)
{ {
m_columnWidths.set(c, new Float(columnWidth+remainingWidth)); m_columnWidths.set(c, Float.valueOf(columnWidth+remainingWidth));
if (log.isLoggable(Level.FINEST)) log.finest("Final col=" + c + " - From " + columnWidth + " to " + m_columnWidths.get(c)); if (log.isLoggable(Level.FINEST)) log.finest("Final col=" + c + " - From " + columnWidth + " to " + m_columnWidths.get(c));
remainingWidth = 0; remainingWidth = 0;
} }

View File

@ -148,7 +148,7 @@ public class DBDataSource extends compiereDataSource
} }
else if (clazz.equals(java.lang.Float.class)) else if (clazz.equals(java.lang.Float.class))
{ {
objValue = new Float(m_resultSet.getFloat(field.getName())); objValue = Float.valueOf(m_resultSet.getFloat(field.getName()));
if(m_resultSet.wasNull()) if(m_resultSet.wasNull())
{ {
objValue = null; objValue = null;