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 di...@apache.org on 2003/03/03 17:55:51 UTC
cvs commit: xml-axis/java/src/org/apache/axis/description TypeDesc.java
dims 2003/03/03 08:55:49
Modified: java/src/org/apache/axis/description TypeDesc.java
Log:
Fix for Bug 17479 - TypeDesc field info not found with Bean without own fields (includes fix)
Revision Changes Path
1.30 +2 -8 xml-axis/java/src/org/apache/axis/description/TypeDesc.java
Index: TypeDesc.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/description/TypeDesc.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- TypeDesc.java 28 Feb 2003 16:21:58 -0000 1.29
+++ TypeDesc.java 3 Mar 2003 16:55:49 -0000 1.30
@@ -308,9 +308,6 @@
*/
public String getFieldNameForElement(QName qname, boolean ignoreNS)
{
- if (fields == null)
- return null;
-
// have we already computed the answer to this question?
if (fieldElementMap != null) {
String cached = (String) fieldElementMap.get(qname);
@@ -322,7 +319,7 @@
String localPart = qname.getLocalPart();
// check fields in this class
- for (int i = 0; i < fields.length; i++) {
+ for (int i = 0; fields != null && i < fields.length; i++) {
FieldDesc field = fields[i];
if (field.isElement()) {
QName xmlName = field.getXmlName();
@@ -361,12 +358,9 @@
*/
public String getFieldNameForAttribute(QName qname)
{
- if (fields == null)
- return null;
-
String possibleMatch = null;
- for (int i = 0; i < fields.length; i++) {
+ for (int i = 0; fields != null && i < fields.length; i++) {
FieldDesc field = fields[i];
if (!field.isElement()) {
// It's an attribute, so if we have a solid match, return