commit | 5e2b2514fadb5ddea9bcfe8b723e8eb7d15e525d | [log] [tgz] |
---|---|---|
author | Paul Pazderski <paul-eclipse@ppazderski.de> | Thu Feb 20 10:05:45 2020 +0100 |
committer | Karsten Thoms <karsten.thoms@karakun.com> | Sun Mar 29 17:11:07 2020 -0400 |
tree | d6fb9f0c0aabc6e304c0c758f540f77fffa808c8 | |
parent | 4f984bac9597c5b0e8422a9923e971b0e502261f [diff] |
Bug 559180 - Suppress false potential resource leak warning And add comment why it is no leak. Change-Id: I67364abc6f2c8cc607219946e8c9bad56f8d0fc6 Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ExternalArchiveSourceContainer.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ExternalArchiveSourceContainer.java index b3ed3ef..3f66da8 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ExternalArchiveSourceContainer.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/sourcelookup/containers/ExternalArchiveSourceContainer.java
@@ -78,6 +78,8 @@ fDetectRoots = detectRootPaths; } + // Suppress resource leak warning. The ZipFile is provided from + // SourceLookupUtils which take care to close them at some point. @SuppressWarnings("resource") @Override public Object[] findSourceElements(String name) throws CoreException {
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupUtils.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupUtils.java index ea44ed1..5891e92 100644 --- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupUtils.java +++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/sourcelookup/SourceLookupUtils.java
@@ -51,6 +51,7 @@ * @exception IOException if unable to create the specified zip * file */ + @SuppressWarnings("resource") public static ZipFile getZipFile(String name) throws IOException { synchronized (fgZipFileCache) { if (fgCleaner == null) {