lahodaj commented on a change in pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#discussion_r475693716



##########
File path: 
java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
##########
@@ -124,7 +125,14 @@
      * @since 0.67
      */
     public static final Set<Kind> CLASS_TREE_KINDS = 
EnumSet.of(Kind.ANNOTATION_TYPE, Kind.CLASS, Kind.ENUM, Kind.INTERFACE);
-    
+    static {

Review comment:
       We could make CLASS_TREE_KINDS immutable, although not necessarily in 
this PR.

##########
File path: 
java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/MoveClassUI.java
##########
@@ -305,7 +305,11 @@ public RefactoringUI create(CompilationInfo info, 
TreePathHandle[] handles, File
                 Collection<TreePathHandle> tphs = new 
ArrayList<TreePathHandle>();
                 SourcePositions sourcePositions = 
info.getTrees().getSourcePositions();
                 for (Element ele : e.getEnclosedElements()) {
-                    Tree leaf = info.getTrees().getPath(ele).getLeaf();
+                    TreePath path = info.getTrees().getPath(ele);
+                    if (path == null) {

Review comment:
       I assume this is null for the synthetic record members, etc., right?




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



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