antelder 2003/03/25 00:44:14
Modified: java/src/org/apache/wsif/providers/java
WSIFOperation_Java.java
Log:
Change getMethods to use an ArrayList instead of Vector
Revision Changes Path
1.39 +8 -11
xml-axis-wsif/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java
Index: WSIFOperation_Java.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/java/WSIFOperation_Java.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- WSIFOperation_Java.java 25 Mar 2003 08:40:41 -0000 1.38
+++ WSIFOperation_Java.java 25 Mar 2003 08:44:14 -0000 1.39
@@ -435,7 +435,8 @@
protected Method[] getMethods(Method[] allMethods)
throws WSIFException {
Trc.entry(this, allMethods);
- Method[] candidates;
+
+ ArrayList candidates = new ArrayList();
if (!fieldIsConstructor) {
@@ -532,19 +533,15 @@
}
}
if (match) {
- possibles.addElement(allMethods[i]);
+ candidates.add(allMethods[i]);
}
}
- candidates = new Method[possibles.size()];
- for (int k = 0; k < candidates.length; k++) {
- candidates[k] = (Method) possibles.get(k);
- }
- Trc.exit(candidates);
- return candidates;
}
- Method[] m = new Method[0];
- Trc.exit(m);
- return m;
+
+ Method[] methods =
+ (Method[]) candidates.toArray(new Method[candidates.size()]);
+ Trc.exit(methods);
+ return methods;
}
protected Operation getOperation() throws Exception {