BradWalker opened a new pull request, #9818: URL: https://github.com/apache/netbeans/pull/9818
Fix race condition in refactoring.api module that a failed test caught. As part of my `Map raw type cleanup` a test continually failed. `[junit] WARNING: package com.sun.java.swing.plaf.windows not in java.desktop [junit] WARNING: package com.apple.laf not in java.desktop [junit] Testsuite: org.netbeans.modules.refactoring.java.test.ReplaceConstructorWithBuilderTest [junit] Working directory: /home/runner/work/netbeans/netbeans/java/refactoring.java/build/test/unit/work/o.n.m.r.j.t.R/rwb [junit] Tests run: 12, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 40.954 sec [junit] [junit] ------------- Standard Error ----------------- [junit] Working directory: /home/runner/work/netbeans/netbeans/java/refactoring.java/build/test/unit/work/o.n.m.r.j.t.R/rwb [junit] ------------- ---------------- --------------- [junit] Testcase: testReplaceWithBuilder(org.netbeans.modules.refactoring.java.test.ReplaceConstructorWithBuilderTest):Caused an ERROR [junit] null [junit] java.util.ConcurrentModificationException [junit] at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1605) [junit] at java.base/java.util.Has hMap$ValueIterator.next(HashMap.java:1633) [junit] at org.netbeans.modules.refactoring.spi.impl.UndoableWrapper.close(UndoableWrapper.java:86) [junit] at org.netbeans.modules.refactoring.api.RefactoringSession.reallyDoRefactoring(RefactoringSession.java:153) [junit] at org.netbeans.modules.refactoring.api.RefactoringSession$1.run(RefactoringSession.java:97) [junit] at org.netbeans.modules.refactoring.api.RefactoringSession$1.run(RefactoringSession.java:95) [junit] at org.netbeans.modules.editor.lib.BeforeSaveTasks.runWithOnSaveTasksDisabled(BeforeSaveTasks.java:68) [junit] at org.netbeans.editor.Utilities.runWithOnSaveTasksDisabled(Utilities.java:1678) [junit] at org.netbeans.modules.refactoring.api.RefactoringSession.doRefactoring(RefactoringSession.java:95) [junit] at org.netbeans.modules.refactoring.java.test.ReplaceConstructorWithBuilderTest.performTest(ReplaceConstructorWithBuilderTest.java:242) [junit] at org.netbeans.modules.refactoring.java.test.ReplaceConstructorWithBuilder Test.testReplaceWithBuilder(ReplaceConstructorWithBuilderTest.java:90) [junit] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) [junit] at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:84) [junit] at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:489) [junit] at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:410) [junit] at java.base/java.lang.Thread.run(Thread.java:1583) [junit] [junit] [junit] Test org.netbeans.modules.refactoring.java.test.ReplaceConstructorWithBuilderTest FAILED` Upon closer inspection, it appears to be a race condition in the refactoring.api module. I used AI to help with this diagnosis. This is an architectural change and therefore needs someone better versed in the Netbeans code base to look at it. -- 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
