Skip to content

Commit 36be5e4

Browse files
jukziiloveeclipse
authored andcommitted
Avoid potential Threadlocal.set(null) memory leak
Threadlocal.set(null) keeps a reference to ThreadLocal.this see https://rules.sonarsource.com/java/RSPEC-5164
1 parent 7b4d682 commit 36be5e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeltaProcessingState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ public void run() throws Exception {
502502
} finally {
503503
// TODO (jerome) see 47631, may want to get rid of following so as to reuse delta processor ?
504504
if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
505-
this.deltaProcessors.set(null);
505+
this.deltaProcessors.remove();
506506
} else {
507507
// If we are going to reuse the delta processor of this thread, don't hang on to state
508508
// that isn't meant to be reused. https://bugs.eclipse.org/bugs/show_bug.cgi?id=273385

0 commit comments

Comments
 (0)