Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed PMD warnings: more descriptive field names; use of Integer.valu…

…eOf()
  • Loading branch information...
commit 02020d6045b5219ea9c00eed3063a18c79c799dd 1 parent cabd95f
@egonw egonw authored
View
4 src/main/org/openscience/cdk/signature/AtomSignature.java
@@ -90,9 +90,9 @@ public int getIntLabel(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;
}
View
6 src/main/org/openscience/cdk/signature/Orbit.java
@@ -79,11 +79,11 @@ public Orbit(String label, int height) {
*/
@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;
}
/**
View
8 src/main/org/openscience/cdk/signature/SignatureQuotientGraph.java
@@ -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;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.