Skip to content

Commit

Permalink
Fixed PMD warnings: more descriptive field names; use of Integer.valu…
Browse files Browse the repository at this point in the history
…eOf()
  • Loading branch information
egonw committed Jun 23, 2010
1 parent cabd95f commit 02020d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/main/org/openscience/cdk/signature/AtomSignature.java
Expand Up @@ -90,9 +90,9 @@ public int[] getConnected(int vertexIndex) {
IAtom atom = this.molecule.getAtom(vertexIndex);
List<IAtom> connected = this.molecule.getConnectedAtomsList(atom);
int[] connectedIndices = new int[connected.size()];
int i = 0;
int indexCounter = 0;
for (IAtom otherAtom : connected) {
connectedIndices[i++] = this.molecule.getAtomNumber(otherAtom);
connectedIndices[indexCounter++] = this.molecule.getAtomNumber(otherAtom);
}
return connectedIndices;
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/org/openscience/cdk/signature/Orbit.java
Expand Up @@ -79,11 +79,11 @@ public Iterator<Integer> iterator() {
*/
@TestMethod("testClone")
public Object clone() {
Orbit o = new Orbit(this.label, this.height);
Orbit orbit = new Orbit(this.label, this.height);
for (Integer i : this.atomIndices) {
o.atomIndices.add(new Integer(i));
orbit.atomIndices.add(Integer.valueOf(i));
}
return o;
return orbit;
}

/**
Expand Down
Expand Up @@ -77,10 +77,10 @@ public SignatureQuotientGraph(IAtomContainer atomContainer, int height) {
* @see signature.AbstractQuotientGraph#isConnected(int, int)
*/
@Override
public boolean isConnected(int i, int j) {
IAtom a = atomContainer.getAtom(i);
IAtom b = atomContainer.getAtom(j);
return atomContainer.getBond(a, b) != null;
public boolean isConnected(int index1, int index2) {
IAtom atom1 = atomContainer.getAtom(index1);
IAtom atom2 = atomContainer.getAtom(index2);
return atomContainer.getBond(atom1, atom2) != null;
}

}

0 comments on commit 02020d6

Please sign in to comment.