BradWalker commented on PR #6112:
URL: https://github.com/apache/netbeans/pull/6112#issuecomment-7054138703

   @mbien & @matthiasblaesing , yes this code was strictly about cleaning up 
`Map raw type warnings`. Apparently my code cleanup exposed a race condition. I 
rebased against master and tested everything. But, the tests kept failing at 
the following test.
   
   `[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 inspection it looks like the **test actually found a race condition** 
in the Netbeans base code. So I looked at this issue closer using AI. The 
suggested change looks appropriate and minimal. I reran the tests with the 
change and they all pass. Since the change to UndoableWrapper.java & 
RefactoringSession needs to be looked at with better trained eyes, I pinged the 
both of you about this.
   
   I think the test actually did find an issue. The AI actually did make a 
reasonable suggested change. 


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