You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by mb...@apache.org on 2022/12/19 02:23:26 UTC

[netbeans] branch master updated: Fix organize imports to not add record from same package

This is an automated email from the ASF dual-hosted git repository.

mbien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 996a2888f5 Fix organize imports to not add record from same package
     new a8edf3bf92 Merge pull request #5046 from jirkabs/fix-4553
996a2888f5 is described below

commit 996a2888f55a6c01eb158e8258d1cb8c98cc83cf
Author: Jiří Havelka <ji...@bohemian.studio>
AuthorDate: Sun Dec 4 11:48:43 2022 +0100

    Fix organize imports to not add record from same package
    
    fixes apache/netbeans#4553
---
 .../src/org/netbeans/api/java/source/GeneratorUtilities.java            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/java.source.base/src/org/netbeans/api/java/source/GeneratorUtilities.java b/java/java.source.base/src/org/netbeans/api/java/source/GeneratorUtilities.java
index 6b0cc4b9e7..a902dd71f5 100644
--- a/java/java.source.base/src/org/netbeans/api/java/source/GeneratorUtilities.java
+++ b/java/java.source.base/src/org/netbeans/api/java/source/GeneratorUtilities.java
@@ -133,7 +133,6 @@ import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileUtil;
 import org.openide.util.Exceptions;
 
-import static javax.lang.model.type.TypeKind.VOID;
 
 /**
  *
@@ -1346,6 +1345,7 @@ public final class GeneratorUtilities {
                 case CLASS:
                 case ENUM:
                 case INTERFACE:
+                case RECORD:
                     if (currentToImportElement.getEnclosingElement().getKind() == ElementKind.PACKAGE)
                         el = currentToImportElement.getEnclosingElement();
                     break;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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