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
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;
try{
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");
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
+ " - OrigWidth=" + origWidth + " - Width=" + colWidth + " - Total=" + p_width);
}
else
{
m_columnWidths.set(col, new Float(colWidth));
m_columnWidths.set(col, Float.valueOf(colWidth));
p_width += (colWidth - origWidth.floatValue());
if (log.isLoggable(Level.FINEST)) log.finest("New Width - Col=" + col
+ " - OrigWidth=" + origWidth + " - Width=" + colWidth + " - Total=" + p_width);
@ -571,7 +571,7 @@ public class TableElement extends PrintElement
// Add new Column
else
{
m_columnWidths.add(new Float(colWidth));
m_columnWidths.add(Float.valueOf(colWidth));
p_width += colWidth;
if (log.isLoggable(Level.FINEST)) log.finest("Width - Col=" + dataCol
+ " - Width=" + colWidth + " - Total=" + p_width);
@ -591,7 +591,7 @@ public class TableElement extends PrintElement
rowHeight = (float)dimensions.get(col).height;
} // for all columns
rowHeight += m_tFormat.getLineStroke().floatValue() + (2*V_GAP);
m_rowHeights.add(new Float(rowHeight));
m_rowHeights.add(Float.valueOf(rowHeight));
p_height += rowHeight;
} // for all rows
// 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);
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
else
@ -655,7 +655,7 @@ public class TableElement extends PrintElement
m_firstRowOnPage.add(new Integer(dataRow+addlRows)); // Y
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()
+ " - PageHeight=" + usedHeight);
}
@ -678,7 +678,7 @@ public class TableElement extends PrintElement
+ ", Row=" + dataRow + ",AddlRows=" + addlRows + ", Height=" + rowHeight
+ " - Available=" + availableHeight + ", Used=" + usedHeight);
} // 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()
+ " - PageHeight=" + usedHeight);
} // multiple Y | pages
@ -761,12 +761,12 @@ public class TableElement extends PrintElement
int additionalPart = columnWidth * availableWidth / totalWidth;
if (remainingWidth < additionalPart)
{
m_columnWidths.set(col, new Float(columnWidth+remainingWidth));
m_columnWidths.set(col, Float.valueOf(columnWidth+remainingWidth));
remainingWidth = 0;
}
else
{
m_columnWidths.set(col, new Float(columnWidth+additionalPart));
m_columnWidths.set(col, Float.valueOf(columnWidth+additionalPart));
remainingWidth -= additionalPart;
}
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();
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));
remainingWidth = 0;
}

View File

@ -148,7 +148,7 @@ public class DBDataSource extends compiereDataSource
}
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())
{
objValue = null;