Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2015-12-01 16:08:09 +0000
committerMarkus Keller2015-12-01 16:08:09 +0000
commit7e4ccad828f771ba6f03bf5c585ba5779d2bacdc (patch)
tree03b76b849af8d95c448ebbab5434ce1c06ab72bb /org.eclipse.jface.text
parent96da92a20589d62dad534245c5d9c4d45618ee95 (diff)
downloadeclipse.platform.text-7e4ccad828f771ba6f03bf5c585ba5779d2bacdc.tar.gz
eclipse.platform.text-7e4ccad828f771ba6f03bf5c585ba5779d2bacdc.tar.xz
eclipse.platform.text-7e4ccad828f771ba6f03bf5c585ba5779d2bacdc.zip
follow-up to bug 478673: fixed resource leaks
Diffstat (limited to 'org.eclipse.jface.text')
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java
index bfc04873562..9b5f5bfc3fb 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java
@@ -427,9 +427,8 @@ public class BrowserInformationControl extends AbstractInformationControl implem
// Instead of inserting an empty line, it just adds a single line break.
// Furthermore, the indentation of <dl><dd> elements is too small (e.g with a long @see line)
TextPresentation presentation= new TextPresentation();
- HTML2TextReader reader= new HTML2TextReader(new StringReader(fInput.getHtml()), presentation);
String text;
- try {
+ try (HTML2TextReader reader= new HTML2TextReader(new StringReader(fInput.getHtml()), presentation)) {
text= reader.getString();
} catch (IOException e) {
text= ""; //$NON-NLS-1$

Back to the top