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 2018/01/14 07:29:07 UTC

[GitHub] dtrebbien commented on a change in pull request #364: [NETBEANS-252] Fix CG adding methods to enum constant bodies

dtrebbien commented on a change in pull request #364: [NETBEANS-252] Fix CG adding methods to enum constant bodies
URL: https://github.com/apache/incubator-netbeans/pull/364#discussion_r161389707
 
 

 ##########
 File path: java.source.base/src/org/netbeans/modules/java/source/save/CasualDiff.java
 ##########
 @@ -5119,6 +5128,7 @@ private int diffTreeImpl0(JCTree oldT, JCTree newT, JCTree parent /*used only fo
 
         if (oldT == newT)
             return elementBounds[0];
+        assert oldT != null;
 
 Review comment:
   I am not sure I understand your comment. `oldT` cannot be `null` at line 5131. Assume that diffTreeImpl0() is called with `oldT = null`. To get past the if statement on line 5126, `newT` would have to be `null`. But then, `oldT == newT` (`null == null`), so the method would return `elementBounds[0]` from the preceding if.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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