BradWalker commented on code in PR #5714: URL: https://github.com/apache/netbeans/pull/5714#discussion_r1148431495
########## ide/db/src/org/netbeans/modules/db/explorer/dlg/CreateTableDialog.java: ########## @@ -471,7 +471,7 @@ public DataTable(TableModel model) { Map cmap = ColumnItem.getColumnProperty(i); col.setIdentifier(cmap.get("name")); //NOI18N columnName = NbBundle.getMessage (CreateTableDialog.class, "CreateTable_" + i); //NOI18N - columnWidth = (new Double(getFontMetrics(getFont()).getStringBounds(columnName, getGraphics()).getWidth())).intValue() + 20; + columnWidth = Double.valueOf(getFontMetrics(getFont()).getStringBounds(columnName, getGraphics()).getWidth()).intValue() + 20; Review Comment: I looked at the JLS and I'm going to leave it as is if you are okay with this. The reason is is the JLS section 5.1.3 Narrowing Primitive Conversions talks about how valueOf() gets handled. The JLS section 5.5. Casting Contexts handles type casting and it's not really clear both narrow/expand the cast the same way. I would really have to look at this in great detail and the work just didn't justify the brain power. 8-) So I decided to jjust go the route of guarantee the same behavior. There is a combination of narrowing and expanding here and it it's probably better to just guarantee the same behavior. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org For additional commands, e-mail: notifications-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists