diff options
| author | Dani Megert | 2016-02-22 11:49:17 +0000 |
|---|---|---|
| committer | Dani Megert | 2016-02-22 11:49:17 +0000 |
| commit | dc8075de1a9064e76aa966a63403731a6964843d (patch) | |
| tree | 702f06e325552a668195a6781055e667bc105e0b | |
| parent | 69f16f0f17aa8eca62bd1e432803dacecf3841ca (diff) | |
| download | eclipse.pde.ui-dc8075de1a9064e76aa966a63403731a6964843d.tar.gz eclipse.pde.ui-dc8075de1a9064e76aa966a63403731a6964843d.tar.xz eclipse.pde.ui-dc8075de1a9064e76aa966a63403731a6964843d.zip | |
Fixed potential resource leak on 'fc'
| -rwxr-xr-x | ua/org.eclipse.pde.ua.ui/src/org/eclipse/pde/internal/ua/ui/editor/toc/TocHTMLTitleUtil.java | 4 |
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$ |
