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 2020/08/24 15:19:56 UTC

[GitHub] [netbeans] lahodaj commented on a change in pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

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:
users@infra.apache.org



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