singh-akhilesh commented on a change in pull request #1877: 
[NETBEANS-3604]Supports for Records (JEP 359) in JDK-14"
URL: https://github.com/apache/netbeans/pull/1877#discussion_r368236839
 
 

 ##########
 File path: 
java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/Utilities.java
 ##########
 @@ -557,7 +557,7 @@ private static int findBodyStartImpl(CompilationInfo info, 
Tree cltree, Compilat
     
     public static int findBodyStart(final CompilationInfo info, final Tree 
cltree, final CompilationUnitTree cu, final SourcePositions positions, final 
Document doc) {
         Kind kind = cltree.getKind();
-        if (!TreeUtilities.CLASS_TREE_KINDS.contains(kind) && kind != 
Kind.METHOD)
+        if (!TreeUtilities.CLASS_TREE_KINDS.contains(kind) && kind != 
Kind.METHOD && !cltree.getKind().toString().equals("RECORD"))
 
 Review comment:
   Tree.Kind.RECORD is a final Enumset, So adding RECORD here as a preview 
feature would result a compilation failure for the versions below 14. 

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