mbien opened a new issue, #6725:
URL: https://github.com/apache/netbeans/issues/6725

   ### Apache NetBeans version
   
   Apache NetBeans 19
   
   ### What happened
   
   Have a class and a unit test for the class in a maven project which has a 
module-info.java
   
   Now rename the method name of the tested class, this will successfully 
rename it in the test and everywhere else, however the editor will show errors 
until the project is rebuilt.
   
   The error will always show up on the test file, no matter if the code change 
was initiated from the test (e.g via rename refactoring) or from the actual 
class.
   
   As soon module-info is removed or commented out it works as expected, the 
editor refreshes after ~1s and notices code updates - no error annotations are 
shown.
   
   ### How to reproduce
   
   test:
   ```java
   import org.junit.jupiter.api.Test;
   
   public class RefreshBugTest {
       @Test
       public void refreshBug() {
           // 1) rename method -> editor should refresh as expected, no errors 
should show up
           // 2) uncomment module-info contents, clean build, rename again -> 
editor does not refresh until rebuild
           RefreshBug.rename1();
       }
   }
   ```
   class:
   ```java
   public class RefreshBug {
       // see unit test
       public static void rename1() {
           System.out.println("Hello There!");
       }
   }
   ```
   module-info.java
   ```java
   // uncomment to trigger the bug
   //module test.module {
   //    requires jdk.compiler;
   //}
   ```
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   linux
   
   ### JDK
   
   JDK 21
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


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