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/05/18 14:21:00 UTC

[GitHub] svatoun commented on a change in pull request #519: [NETBEANS-481] JDK10-LVTI: Added new ErrorRule to fix compiler error on initialization of var type variable with array

svatoun commented on a change in pull request #519: [NETBEANS-481] JDK10-LVTI: Added new ErrorRule to fix compiler error on initialization of var type variable with array
URL: https://github.com/apache/incubator-netbeans/pull/519#discussion_r189284144
 
 

 ##########
 File path: java.source.base/src/org/netbeans/modules/java/source/save/CasualDiff.java
 ##########
 @@ -1477,27 +1477,26 @@ private int diffVarDef(JCVariableDecl oldT, JCVariableDecl newT, int[] bounds) {
                     int modsUpperBound = getCommentCorrectedEndPos(oldT.mods);
                     if (modsUpperBound > -1) {
                         tokenSequence.move(modsUpperBound);
-                        tokenSequence.moveNext();
 
                         // copying modifiers from oldTree
-                        if (JavaTokenId.WHITESPACE == tokenSequence.token().id()) {
-                            int offset = tokenSequence.offset();
-                            copyTo(localPointer, localPointer = offset);
-                        } else {
+                        if (tokenSequence.moveNext()) {
 
 Review comment:
   OK, I get why the change was done.  And sorry, `copyTo` does not handle after-end-of-text position gracefully, my fault.

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