harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r422282 - in /incubator/harmony/enhanced/classlib/trunk/modules/prefs/src: main/java/java/util/prefs/AbstractPreferences.java test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Date Sat, 15 Jul 2006 19:36:47 GMT
Author: ndbeyer
Date: Sat Jul 15 12:36:46 2006
New Revision: 422282

URL: http://svn.apache.org/viewvc?rev=422282&view=rev
Log:
Apply path for HARMONY-880: AbstractPreferences.exportSubTree(null) throws different exceptions
on RI and

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
    incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java?rev=422282&r1=422281&r2=422282&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/AbstractPreferences.java
Sat Jul 15 12:36:46 2006
@@ -363,6 +363,9 @@
      */
     public void exportNode(OutputStream ostream) throws IOException,
             BackingStoreException {
+        if(ostream == null) {
+            throw new AssertionError("Stream is null"); //$NON-NLS-1$
+        }
         checkState();
         XMLParser.exportPrefs(this, ostream, false);
 
@@ -374,6 +377,10 @@
      */
     public void exportSubtree(OutputStream ostream) throws IOException,
             BackingStoreException {
+        if(ostream == null) {
+            throw new AssertionError("Stream is null"); //$NON-NLS-1$
+        }
+
         checkState();
         XMLParser.exportPrefs(this, ostream, true);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java?rev=422282&r1=422281&r2=422282&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Sat Jul 15 12:36:46 2006
@@ -1003,7 +1003,7 @@
 		try {
 			pref.exportNode(null);
 			fail();
-		} catch (NullPointerException e) {
+		} catch (AssertionError e) {
 		}
 
 		pref.putBoolean("key", false);
@@ -1067,7 +1067,7 @@
 		try {
 			pref.exportSubtree(null);
 			fail();
-		} catch (NullPointerException e) {
+		} catch (AssertionError e) {
 		}
 		ByteArrayOutputStream out = new ByteArrayOutputStream();
 		pref.putBoolean("key", false);



Mime
View raw message