incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From monte...@apache.org
Subject svn commit: r888890 - /incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
Date Wed, 09 Dec 2009 17:43:38 GMT
Author: monteith
Date: Wed Dec  9 17:43:38 2009
New Revision: 888890

URL: http://svn.apache.org/viewvc?rev=888890&view=rev
Log:
Fix NPE in KatoReader.

Modified:
    incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java

Modified: incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java?rev=888890&r1=888889&r2=888890&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
(original)
+++ incubator/kato/trunk/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
Wed Dec  9 17:43:38 2009
@@ -1534,8 +1534,15 @@
 			JavaClass javaClass = getClass(refType);
 			if (javaClass != null){
 				Vector<Byte> vctr = new Vector<Byte>();
-				addLongToVector(vctr, javaClass.getClassLoader().getObject().getID().getAddress());
-				logr.log(JDILogger.LEVEL_VERYVERBOSE, "  " + javaClass.getClassLoader().getObject().getID().getAddress());
//$NON-NLS-1$
+				JavaObject obj = javaClass.getClassLoader().getObject();
+				long address = 0L;
+				
+				if (obj != null) {
+					address = obj.getID().getAddress();
+				} 
+				
+				addLongToVector(vctr, address);
+				logr.log(JDILogger.LEVEL_VERYVERBOSE, "  0x" + Long.toHexString(address) ); //$NON-NLS-1$
 				ReplyPacket rpckt = new ReplyPacket(cpckt.getSequence(), FLAG_REPLY_PACKET, ERROR_NONE);
 				rpckt.setData(vectorToByte(vctr));
 				return rpckt;



Mime
View raw message