BradWalker commented on code in PR #5714:
URL: https://github.com/apache/netbeans/pull/5714#discussion_r1148432775


##########
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:
   Hey @matthiasblaesing , I would like to leave this one "as is" if you are 
okay with it. The reason is the Java Lang. Spec. specifices narrowing behavior 
of intValue() and in a different section it talks about casting. It's not 
really clear that they are equivalent. I agree it can be made "cleaner". But, I 
decided to just go with "guaranteed" behavior here.



-- 
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

Reply via email to