You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/12/14 02:43:04 UTC

[GitHub] [netbeans] lkishalmi commented on a change in pull request #1777: [NETBEANS-3592] Workarounds for JDK Windows LAF bugs on HiDPI screens

lkishalmi commented on a change in pull request #1777: [NETBEANS-3592] Workarounds for JDK Windows LAF bugs on HiDPI screens
URL: https://github.com/apache/netbeans/pull/1777#discussion_r357892060
 
 

 ##########
 File path: platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/windows8/DPISafeBorder.java
 ##########
 @@ -44,16 +44,26 @@
      * @param color may not be null
      */
     public static Border matte(int top, int left, int bottom, int right, Color color) {
-        return new DPISafeBorder(new Insets(top, left, bottom, right), color);
+        return fromDelegate(new MatteBorder(new Insets(top, left, bottom, right), color));
     }
 
-    private DPISafeBorder(Insets insets, Color color) {
-        if (insets == null)
+    public static Border fromDelegate(Border delegate) {
+        if (delegate == null)
 
 Review comment:
   Well, my humble opinion is that we shall avoid throwing NullPointerExceptions directly from the code. It would be better to do an ```assert <whatever> != null;``` instead.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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