michael-rhoese opened a new issue #3494:
URL: https://github.com/apache/netbeans/issues/3494


   ### Apache NetBeans version
   
   Latest release
   
   ### What happened
   
   I created 2 records and imported them in a class that is not located in the 
same package. Both imports are removed on file save automatically.
   
   ### How to reproduce
   
   First record:
   `public record Vertex(boolean start, Class<? extends Enum<?>> state, 
List<Link> outgoingLinks) {
   
       public static Vertex of(boolean start, Class<? extends Enum<?>> state) {
           return new Vertex(start, state, new LinkedList<>());
       }
   }`
   Second record:
   `public record Link(Enum<?> event, Vertex from, Vertex to, Method 
stateChangeFunction) {
   
       public static Link of(Enum<?> event, Vertex from, Vertex to, Method 
stateChangeFunction) {
           return new Link(event, from, to, stateChangeFunction);
       }
   }`
   
   Add both (or one) as attributes to another class, that is not in the same 
package, and save the file.
   `public class AnotherClazz{
   
       private Vertex vertex;
   
       private Link;
   }`
   
   
   
   ### Did this work correctly in an earlier version?
   
   - [ ] This used to work!
   
   ### Operating System
   
   Windows 10 Pro 21H2
   
   ### JDK
   
   OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow the Apache Software Foundation's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct.html)
   


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

To unsubscribe, e-mail: [email protected]

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