Skip to content

Commit 3e708ba

Browse files
committed
Resolve #523 5 Test null, also update doc links.
1 parent a9bc131 commit 3e708ba

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

base/core/src/main/java/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ && countAttachedDoubleBonds(connectedBonds, atom) > 0) {
984984
* @param container container of the atom
985985
*
986986
* @return whether the atom's only bonds are to heteroatoms
987-
* @see #perceiveNitrogens(org.openscience.cdk.interfaces.IAtomContainer, org.openscience.cdk.interfaces.IAtom)
987+
* @see #perceiveNitrogens(IAtomContainer, IAtom, RingSearch, List)
988988
*/
989989
private boolean isSingleHeteroAtom(IAtom atom, IAtomContainer container) {
990990

@@ -2344,10 +2344,10 @@ private IAtomType perceiveBromine(IAtomContainer atomContainer, IAtom atom) thro
23442344
}
23452345
}
23462346
return null;
2347-
} else if ((atom.getFormalCharge() != CDKConstants.UNSET && atom.getFormalCharge() == -1)) {
2347+
} else if (atom.getFormalCharge() != null && atom.getFormalCharge() == -1) {
23482348
IAtomType type = getAtomType("Br.minus");
23492349
if (isAcceptable(atom, atomContainer, type)) return type;
2350-
} else if (atom.getFormalCharge() == 1) {
2350+
} else if (atom.getFormalCharge() != null && atom.getFormalCharge() == 1) {
23512351
IBond.Order maxBondOrder = atomContainer.getMaximumBondOrder(atom);
23522352
if (maxBondOrder == IBond.Order.DOUBLE) {
23532353
IAtomType type = getAtomType("Br.plus.sp2");
@@ -2441,7 +2441,7 @@ private boolean hasAromaticBond(List<IBond> connectedBonds) {
24412441
/**
24422442
* Count the number of doubly bonded atoms.
24432443
*
2444-
* @param container the molecule in which to look
2444+
* @param connectedBonds bonds connected to the atom
24452445
* @param atom the atom being looked at
24462446
* @param order the desired bond order of the attached bonds
24472447
* @param symbol If not null, then it only counts the double bonded atoms which

0 commit comments

Comments
 (0)