diff options
author | Jay Arthanareeswaran | 2016-07-11 08:25:46 +0000 |
---|---|---|
committer | Jay Arthanareeswaran | 2016-07-12 04:17:34 +0000 |
commit | 0171d3fa20410a884ea6de07ec393bc179fb73bd (patch) | |
tree | bb3013fe07db27730ff5c1b1640933301531995c /org.eclipse.jdt.compiler.apt | |
parent | f81497cf3f12c283b35bf7d81ebf758cd023c11d (diff) | |
download | eclipse.jdt.core-0171d3fa20410a884ea6de07ec393bc179fb73bd.tar.gz eclipse.jdt.core-0171d3fa20410a884ea6de07ec393bc179fb73bd.tar.xz eclipse.jdt.core-0171d3fa20410a884ea6de07ec393bc179fb73bd.zip |
Bug 487421 - Annotation processing manager in batch compilation mode
keeps opened JAR files longer than necessary.
Tests are present in the form of ModuleCompilationTests.
Diffstat (limited to 'org.eclipse.jdt.compiler.apt')
-rw-r--r-- | org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BatchAnnotationProcessorManager.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BatchAnnotationProcessorManager.java b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BatchAnnotationProcessorManager.java index 67cc77c86b..2b195ff904 100644 --- a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BatchAnnotationProcessorManager.java +++ b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BatchAnnotationProcessorManager.java @@ -1,15 +1,21 @@ /******************************************************************************* - * Copyright (c) 2005, 2015 IBM Corporation and others. + * Copyright (c) 2005, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * + * This is an implementation of an early-draft specification developed under the Java + * Community Process (JCP) and is made available for testing and evaluation purposes + * only. The code is not compatible with any specification of the JCP. + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.internal.compiler.apt.dispatch; +import java.io.IOException; +import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -232,5 +238,15 @@ public class BatchAnnotationProcessorManager extends BaseAnnotationProcessorMana _commandLineProcessors = null; _commandLineProcessorIter = null; } - + @Override + public void reset() { + super.reset(); + if (this._procLoader instanceof URLClassLoader) { + try { + ((URLClassLoader) this._procLoader).close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } } |