harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r709182 - /harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java
Date Thu, 30 Oct 2008 15:39:36 GMT
Author: sjanuary
Date: Thu Oct 30 08:39:36 2008
New Revision: 709182

URL: http://svn.apache.org/viewvc?rev=709182&view=rev
Log:
Apply patch for HARMONY-5986 ([classlib][beans] XMLEncoder should check for null stat in recordStatement)

Modified:
    harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java?rev=709182&r1=709181&r2=709182&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/XMLEncoder.java
Thu Oct 30 08:39:36 2008
@@ -801,6 +801,7 @@
 	}
 
 	private void recordStatement(Statement stat) {
+        if (null == stat) return;
 		// deal with 'owner' property
 		if (stat.getTarget() == owner && owner != null) {
 			needOwner = true;
@@ -940,6 +941,11 @@
 	 */
 	@Override
     public void writeStatement(Statement oldStat) {
+        if(null == oldStat) {
+            System.err.println("java.lang.Exception: XMLEncoder: discarding statement null");
+            System.err.println("Continuing...");
+            return;
+        }
 		// record how the object is changed
 		recordStatement(oldStat);
 



Mime
View raw message