Skip to content

Commit

Permalink
resolves error from unit testing on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-foscato committed Nov 11, 2022
1 parent b99a050 commit 0ee985e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/denoptim/io/IteratingAtomContainerReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ public IteratingAtomContainerReader(File input)
FormatFactory factory = new FormatFactory();
factory.registerFormat(new SMILESListFormat());

IChemFormat chemFormat = factory.guessFormat(
new BufferedReader(new FileReader(input)));
BufferedReader headReader = new BufferedReader(new FileReader(input));
IChemFormat chemFormat = factory.guessFormat(headReader);
headReader.close();

if (chemFormat instanceof MDLV2000Format
|| chemFormat instanceof MDLV3000Format)
{
Expand Down

0 comments on commit 0ee985e

Please sign in to comment.