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 to...@apache.org on 2002/01/14 18:31:37 UTC
cvs commit: xml-axis/java/src/org/apache/axis/encoding TypeMappingRegistry.java
tomj 02/01/14 09:31:37
Modified: java/src/org/apache/axis/encoding TypeMappingRegistry.java
Log:
Add some defensive code to prevent null pointer access.
Revision Changes Path
1.47 +2 -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.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- TypeMappingRegistry.java 23 Dec 2001 12:33:32 -0000 1.46
+++ TypeMappingRegistry.java 14 Jan 2002 17:31:36 -0000 1.47
@@ -271,7 +271,8 @@
!_class.getName().equals("java.lang.Object"))
classes.add( _class );
- _class = (Class) classes.remove( 0 );
+ _class = (!classes.isEmpty()) ? (Class) classes.remove( 0 ) :
+ null;
}
if ( ser != null ) {