ashwintemkar commented on issue #9661:
URL: https://github.com/apache/netbeans/issues/9661#issuecomment-6066529223

   Meanwhile I dug into this a bit and found the actual cause.
   
   There is a method in the comment handling code that deliberately skips 
attaching the copyright header to the file when there is no package 
declaration. That is why the header ends up attached to the class instead, and 
a new import gets placed above it rather than below.
   
   This code is old, it goes back to the original donation to Apache in 2017, 
and it is shared by a lot of Java source generation features, not just imports. 
So I want to be careful rather than changing it directly.
   
   I am thinking of fixing this on the import insertion side instead, making 
sure a new import always lands after any leading header comment, rather than 
touching the shared comment logic itself.
   
   Does that sound okay to move forward with?
   


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