You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2023/03/26 09:58:53 UTC

[GitHub] [netbeans] mbien commented on a diff in pull request #5714: Cleanup the use of Double primitive wrapper.

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


##########
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:
   `valueOf(..).fooValue()` can be shortened to the more efficient/compact `parseFoo(..)`. NetBeans should actually give this suggestion already as a hint.



-- 
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-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists