Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2016-02-22 11:49:17 +0000
committerDani Megert2016-02-22 11:49:17 +0000
commitdc8075de1a9064e76aa966a63403731a6964843d (patch)
tree702f06e325552a668195a6781055e667bc105e0b
parent69f16f0f17aa8eca62bd1e432803dacecf3841ca (diff)
downloadeclipse.pde.ui-dc8075de1a9064e76aa966a63403731a6964843d.tar.gz
eclipse.pde.ui-dc8075de1a9064e76aa966a63403731a6964843d.tar.xz
eclipse.pde.ui-dc8075de1a9064e76aa966a63403731a6964843d.zip
Fixed potential resource leak on 'fc'
-rwxr-xr-xua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocHTMLTitleUtil.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocHTMLTitleUtil.java b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocHTMLTitleUtil.java
index e5b2a8ef9f..53fa41be12 100755
--- a/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocHTMLTitleUtil.java
+++ b/ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocHTMLTitleUtil.java
@@ -51,8 +51,8 @@ public class TocHTMLTitleUtil {
}
String title = null;
- try (FileInputStream inputStream = new FileInputStream(f)) {
- FileChannel fc = inputStream.getChannel();
+ try (FileInputStream inputStream = new FileInputStream(f); FileChannel fc = inputStream.getChannel()) {
+
MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
CharBuffer cb = Charset.forName("8859_1").newDecoder().decode(bb); //$NON-NLS-1$

Back to the top