antelder 2003/03/21 01:14:31
Modified: java/src/org/apache/wsif/providers ProviderUtils.java
Log:
Avoid clast cast exception when searching for a complex type for a QName
Revision Changes Path
1.7 +5 -3
xml-axis-wsif/java/src/org/apache/wsif/providers/ProviderUtils.java
Index: ProviderUtils.java
===================================================================
RCS file:
/home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/ProviderUtils.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ProviderUtils.java 7 Mar 2003 14:59:31 -0000 1.6
+++ ProviderUtils.java 21 Mar 2003 09:14:31 -0000 1.7
@@ -491,9 +491,11 @@
String name = type.getLocalPart();
for (int i=0; i<l.size() && ct==null; i++ ) {
Object o = l.get(i);
- if (name.equals(
((ComplexType)o).getTypeName().getLocalPart() )){
- ct = (ComplexType)o;
- }
+ if (o instanceof ComplexType) {
+ if (name.equals(
((ComplexType)o).getTypeName().getLocalPart() )){
+ ct = (ComplexType)o;
+ }
+ }
}
}
return ct;