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

 ##########
 File path: 
java.source.base/src/org/netbeans/modules/java/source/save/CasualDiff.java
 ##########
 @@ -4269,14 +4276,14 @@ private int diffCommentLists(int oldTreeStartPos, 
List<Comment> oldList,
     }
     
     private int diffDocTree(DCDocComment doc, DCTree oldT, DCTree newT, int[] 
elementBounds) {
-        if (oldT == null && newT != null) {
-            throw new IllegalArgumentException("Null is not allowed in 
parameters.");
-        }
-
         if (oldT == newT) {
             return elementBounds[0];
         }
 
+        if (oldT == null) {
 
 Review comment:
   I know I asked for a code change here, but I think the result is worse now. 
Please leave the code as it was: it's more readable.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to