matthiasblaesing commented on code in PR #5714: URL: https://github.com/apache/netbeans/pull/5714#discussion_r1148446910
########## ide/editor.completion/src/org/netbeans/modules/editor/completion/PatchedHtmlRenderer.java: ########## @@ -176,7 +176,7 @@ private static double _renderPlainString( } double chWidth = wid / chars.length; - int estCharsToPaint = new Double(w / chWidth).intValue(); + int estCharsToPaint = Double.valueOf(w / chWidth).intValue(); Review Comment: Ok - keep it, but from my perspective, if ` Double.valueOf(<double_value>).intValue() == ((int) <double_value>)` is not true for all instances of `<double_value>`, then the language is broken in its core. My reasoning: - `Double.valueOf` should yield the same value as autoboxing - `Number#intValue` should in my mind yield the same value as unboxing the the corresponing primitive box and casting it to `int` I don't see a different possible interpretation. -- 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