Skip to content

Commit

Permalink
Use StringBuilder instead of StringBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Mar 31, 2017
1 parent fd684bd commit 31aa85f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class IteratingSDFReader extends DefaultIteratingChemObjectReader<IAtomCo
private boolean skip = false;

// buffer to store pre-read Mol records in
private StringBuffer buffer = new StringBuffer(10000);
private StringBuilder buffer = new StringBuilder(10000);

private static final String LINE_SEPARATOR = System.getProperty("line.separator");

Expand Down Expand Up @@ -218,7 +218,7 @@ public boolean hasNext() {

hasNext = false;
nextMolecule = null;
buffer.delete(0, buffer.length());
buffer.setLength(0);

// now try to parse the next Molecule
try {
Expand Down

0 comments on commit 31aa85f

Please sign in to comment.