Skip to content

Commit

Permalink
Fix incorrect spelling of 'pseudo' in comments and variable name. Ori…
Browse files Browse the repository at this point in the history
…ginal variable deprecated and left in place.

Signed-off-by: John May <john.wilkinsonmay@gmail.com>
  • Loading branch information
Mark B Vine authored and johnmay committed Sep 29, 2014
1 parent eadef42 commit e2388c2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void elementMismatch() throws Exception {
}

@Test
public void elementPsuedo() throws Exception {
public void elementPseudo() throws Exception {
AtomMatcher matcher = AtomMatcher.forElement();
IAtom atom1 = mock(IPseudoAtom.class);
IAtom atom2 = mock(IPseudoAtom.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ private static int atomicNumber(IAtom atom) {
Integer elem = atom.getAtomicNumber();
if (elem != null) return elem;
if (atom instanceof IPseudoAtom) return 0;
throw new NullPointerException("a non-psuedo atom had unset atomic number");
throw new NullPointerException("a non-pseudoatom had unset atomic number");
}

/**
Expand All @@ -357,7 +357,7 @@ private static int implH(IAtom atom) {
Integer h = atom.getImplicitHydrogenCount();
if (h != null) return h;
if (atom instanceof IPseudoAtom) return 0;
throw new NullPointerException("a non-psuedo atom had unset hydrogen count");
throw new NullPointerException("a non-pseudoatom had unset hydrogen count");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,18 @@ public class MDLV2000Reader extends DefaultChemObjectReader {
/** Delimits Structure-Data (SD) Files. */
private static final String RECORD_DELIMITER = "$$$$";

/** Valid pseudo labels. */
/**
* @deprecated Incorrect spelling
*/
private static final Set<String> PSUEDO_LABELS = ImmutableSet.<String> builder().add("*").add("A").add("Q")
.add("L").add("LP").add("R") // XXX: not in spec
.add("R#").build();

/** Valid pseudo labels. */
private static final Set<String> PSEUDO_LABELS = ImmutableSet.<String> builder().add("*").add("A").add("Q")
.add("L").add("LP").add("R") // XXX: not in spec
.add("R#").build();

public MDLV2000Reader() {
this(new StringReader(""));
}
Expand Down Expand Up @@ -981,7 +988,7 @@ private static boolean isPeriodicElement(final String symbol) {
* @return the symbol is a valid pseudo element
*/
static boolean isPseudoElement(final String symbol) {
return PSUEDO_LABELS.contains(symbol);
return PSEUDO_LABELS.contains(symbol);
}

/**
Expand Down

0 comments on commit e2388c2

Please sign in to comment.