Skip to content

Commit

Permalink
HelpData: close stream after use
Browse files Browse the repository at this point in the history
normally parse() will close stream but won't do it on exception.
  • Loading branch information
EcljpseB0T authored and jukzi committed Jun 14, 2023
1 parent 8226c2e commit e8e9389
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions org.eclipse.help/src/org/eclipse/help/internal/HelpData.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ private void loadHelpData() {
hiddenIndexes = new HashSet<>();
sortMode = "true"; //$NON-NLS-1$
if (url != null) {
try {
try (InputStream in = url.openStream()) {
SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
InputStream in = url.openStream();
parser.parse(in, new Handler());
}
catch (Throwable t) {
Expand Down

0 comments on commit e8e9389

Please sign in to comment.