[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: [jira] (MODELER-32) Used a wrong incrementer in for statement?
From: "Jaechang Nam (JIRA)" <jira () apache ! org>
Date: 2017-01-31 19:54:51
Message-ID: JIRA.13039278.1485892438000.1782.1485892491522 () Atlassian ! JIRA
[Download RAW message or body]
Jaechang Nam created MODELER-32:
-----------------------------------
Summary: Used a wrong incrementer in for statement?
Key: MODELER-32
URL: https://issues.apache.org/jira/browse/MODELER-32
Project: Commons Modeler
Issue Type: Bug
Reporter: Jaechang Nam
Priority: Trivial
In recent github mirror, I've found a suspicious code in \
src/java/org/apache/commons/modeler/modules/MbeansDescriptorsDynamicMBeanSource.java
{code:java}
144 for( int i=0; i<opInfo.length; i++ ) {
145 MBeanOperationInfo moi=opInfo[i];
146 OperationInfo op=new OperationInfo();
147
148 op.setName(moi.getName());
149 op.setReturnType(moi.getReturnType());
150
151 MBeanParameterInfo parms[]=moi.getSignature();
152 for(int j=0; j<parms.length; j++ ) {
153 ParameterInfo pi=new ParameterInfo();
154 pi.setType(parms[i].getType());
155 pi.setName(parms[i].getName());
156 op.addParameter(pi);
157 }
158 mbean.addOperation(op);
159 }
{code}
In Line 154 and 155, j should be used instead of i?
Since I don't have domain knowledge about this project, just report.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic