Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2019-01-17 05:08:44 -0500
committerAndrey Loskutov2019-01-18 01:00:04 -0500
commit091f126c79d8fb903dec0c06d028661cc8a31d04 (patch)
treeb3e515b36cdedca8d11db7aa97bb4de63ee26e83
parent693b5c36ec060cbe30f4fa09b53693885a67319d (diff)
downloadeclipse.jdt.core-091f126c79d8fb903dec0c06d028661cc8a31d04.tar.gz
eclipse.jdt.core-091f126c79d8fb903dec0c06d028661cc8a31d04.tar.xz
eclipse.jdt.core-091f126c79d8fb903dec0c06d028661cc8a31d04.zip
Bug 543506 - java 9, 10, 11 projects: jar files are lockedI20190119-1800I20190118-1800
Close both NameEnvironment instances to prevent leaking opened file descriptors. Change-Id: Ic917f2e8972456aa86f9a2ac728d733671efcea4 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
index d272502db1..269e064480 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
@@ -344,8 +344,14 @@ private void createInconsistentBuildMarker(CoreException coreException) throws C
private void cleanup() {
this.participants = null;
- this.nameEnvironment = null;
- this.testNameEnvironment = null;
+ if(this.nameEnvironment != null) {
+ this.nameEnvironment.cleanup();
+ this.nameEnvironment = null;
+ }
+ if(this.testNameEnvironment != null) {
+ this.testNameEnvironment.cleanup();
+ this.testNameEnvironment = null;
+ }
this.binaryLocationsPerProject = null;
this.lastState = null;
this.notifier = null;

Back to the top