Community
Participate
Working Groups
When running internal tests, we encountered the following intermittent stack trace: [java] java.lang.NullPointerException [java] at org.eclipse.jdt.internal.core.Buffer.addBufferChangedListener(Buffer.java:62) [java] at org.eclipse.jdt.internal.core.CompilationUnit.openBuffer(CompilationUnit.java:1023) [java] at org.eclipse.jdt.internal.core.Openable.getBuffer(Openable.java:263) [java] at org.eclipse.jdt.internal.core.CompilationUnit.getContents(CompilationUnit.java:581) [java] at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:748) [java] at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:588) [java] at com.bea.wlw.common.core.ast.ReaderUtil.parse(ReaderUtil.java:74) [java] at com.bea.wlw.netui.core.page.model.PageStructureBuilder.build(PageStructureBuilder.java:142) [java] at com.bea.wlw.common.core.model.AbstractExternalEventAdapter$StructureBuilderJob.run(AbstractExternalEventAdapter.java:256) [java] at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76) It appears that there is one unsynchronized write to the field Buffer.changeListeners inside of the method Buffer.close()
Created attachment 34253 [details] Proposed Patch This just synchronizes around the write to this.changeListeners in close()
Thanks for the patch, Tim. Released it in HEAD.
Code verified for 3.2 M5 using build I20060214-0010.