[ https://issues.apache.org/jira/browse/JOSHUA-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15850495#comment-15850495 ]
JC commented on JOSHUA-330: --------------------------- Sorry reported in a wrong project > A suspicious use of an incrementer in a for loop > ------------------------------------------------ > > Key: JOSHUA-330 > URL: https://issues.apache.org/jira/browse/JOSHUA-330 > Project: Joshua > Issue Type: Bug > Reporter: JC > Priority: Trivial > > In a recent github snapshot, I've found a suspicious use of an incrementer in > for loop. > src/org/apache/xalan/xsltc/compiler/util/MethodGenerator.java > {code:java} > 501 for (int i = 0; i < slotCount; i++) { > 502 Object slotEntries = _variables.get(i); > 503 if (slotEntries != null) { > 504 if (slotEntries instanceof ArrayList) { > 505 ArrayList slotList = (ArrayList) slotEntries; > 506 > 507 for (int j = 0; j < slotList.size(); j++) { > 508 allVarsEverDeclared.add(slotList.get(i)); > 509 } > 510 } else { > 511 allVarsEverDeclared.add(slotEntries); > 512 } > 513 } > 514 } > {code} > In Line 508, slotList.get( i) should be slotList.get(j)? I have no idea if > slotCount is always same as or less than slotList.size(). However, I thought > it's worth to report just in case. -- This message was sent by Atlassian JIRA (v6.3.15#6346)