Skip to content

Commit

Permalink
Added some resource management
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Aug 23, 2011
1 parent 18e807a commit 05c851c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -80,6 +80,8 @@ public static List<String> getListOfAvailableDatasets(String service)
line = line.trim();
if (line.length() > 0) datasets.add(line);
}
reader.close();
method.releaseConnection();
return datasets;
}

Expand Down Expand Up @@ -109,6 +111,7 @@ public static List<String> getCompoundList(String datasetURI)
line = line.trim();
if (line.length() > 0) compounds.add(line);
}
reader.close();
method.releaseConnection();
return compounds;
}
Expand Down
Expand Up @@ -780,6 +780,8 @@ public List<String> search(String service, String inchi) throws BioclipseExcepti
line = line.trim();
if (line.length() > 0) compounds.add(line);
}
reader.close();
method.releaseConnection();
return compounds;
} catch (Exception exception) {
throw new BioclipseException(
Expand Down

0 comments on commit 05c851c

Please sign in to comment.