You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ga...@apache.org on 2004/06/21 23:24:28 UTC
cvs commit: ws-axis/java/src/org/apache/axis/description TypeDesc.java
gawor 2004/06/21 14:24:28
Modified: java/src/org/apache/axis/description TypeDesc.java
Log:
minor NPE bugs found with FindBugs tool
Revision Changes Path
1.40 +11 -11 ws-axis/java/src/org/apache/axis/description/TypeDesc.java
Index: TypeDesc.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/description/TypeDesc.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- TypeDesc.java 8 Jun 2004 16:47:17 -0000 1.39
+++ TypeDesc.java 21 Jun 2004 21:24:28 -0000 1.40
@@ -255,10 +255,10 @@
return parentDesc.getElementNameForField(fieldName);
}
}
- } else if (!desc.isElement()) {
- return null;
- }
- return desc.getXmlName();
+ } else if (desc.isElement()) {
+ return desc.getXmlName();
+ }
+ return null;
}
/**
@@ -276,14 +276,14 @@
return parentDesc.getAttributeNameForField(fieldName);
}
}
- } else if (desc.isElement()) {
- return null;
- }
- QName ret = desc.getXmlName();
- if (ret == null) {
- ret = new QName("", fieldName);
+ } else if (!desc.isElement()) {
+ QName ret = desc.getXmlName();
+ if (ret == null) {
+ ret = new QName("", fieldName);
+ }
+ return ret;
}
- return ret;
+ return null;
}
/**