directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r171356 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java
Date Sun, 22 May 2005 18:47:11 GMT
Author: elecharny
Date: Sun May 22 11:47:10 2005
New Revision: 171356

URL: http://svn.apache.org/viewcvs?rev=171356&view=rev
Log:
Fixed a NPE in toString function (it is thrown while using a log.debug(OID))

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java?rev=171356&r1=171355&r2=171356&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/primitives/OID.java Sun
May 22 11:47:10 2005
@@ -474,11 +474,15 @@
     {
 
         StringBuffer sb = new StringBuffer();
-        sb.append( oidValues[0] );
-
-        for ( int i = 1; i < oidValues.length; i++ )
+        
+        if (oidValues != null)
         {
-            sb.append( '.' ).append( oidValues[i] );
+	        sb.append( oidValues[0] );
+	
+	        for ( int i = 1; i < oidValues.length; i++ )
+	        {
+	            sb.append( '.' ).append( oidValues[i] );
+	        }
         }
 
         return sb.toString();



Mime
View raw message