axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/encoding TypeMappingRegistry.java
Date Wed, 12 Dec 2001 18:54:08 GMT
dug         01/12/12 10:54:08

  Modified:    java/src/org/apache/axis/encoding TypeMappingRegistry.java
  Log:
  Don't add java.lang.Object to list of classes to check - it
  produces a really bad error message.
  
  Revision  Changes    Path
  1.40      +11 -1     xml-axis/java/src/org/apache/axis/encoding/TypeMappingRegistry.java
  
  Index: TypeMappingRegistry.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/TypeMappingRegistry.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- TypeMappingRegistry.java	2001/12/12 14:02:27	1.39
  +++ TypeMappingRegistry.java	2001/12/12 18:54:08	1.40
  @@ -248,6 +248,8 @@
               // Check the most common case first
               ser = getSerializer( _class = value.getClass() );
               if ( ser == null ) {
  +                // Use a Vector and remove(0) because it MUST be 
  +                // first-in-first-out
                   Vector  classes = new Vector();
                   classes.add( _class );
           
  @@ -259,7 +261,15 @@
                       for (int i = 0 ; i < ifaces.length ; i++ ) 
                           classes.add( ifaces[i] );
                       _class = _class.getSuperclass();
  -                    if ( _class != null ) classes.add( _class );
  +
  +                    // Add any non-null (and non-Object) class.  We skip
  +                    // the Object class because if we reach that then
  +                    // there's an error and this error message return 
  +                    // here is better than the one returned by the
  +                    // ObjSerializer.
  +                    if ( _class != null &&
  +                         !_class.getName().equals("java.lang.Object")) 
  +                       classes.add( _class );
                   }
               }
   
  
  
  

Mime
View raw message