harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r896746 - /harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Date Thu, 07 Jan 2010 03:11:12 GMT
Author: regisxu
Date: Thu Jan  7 03:11:03 2010
New Revision: 896746

URL: http://svn.apache.org/viewvc?rev=896746&view=rev
Log:
Apply fix for HARMONY-4289: [classlib][prefs] test org.apache.harmony.prefs.tests.java.util.prefs.AbstractPreferencesTest
should not depends on Internet connection

validating xml may need to access resource on internet, that may cause test
failure if testing machine can't connect to interent.

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

Modified: 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/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java?rev=896746&r1=896745&r2=896746&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Thu Jan  7 03:11:03 2010
@@ -1090,7 +1090,7 @@
         byte[] result = out.toByteArray();
         ByteArrayInputStream in = new ByteArrayInputStream(result);
 
-        Document doc = parseXmlStream(in, true);
+        Document doc = parseXmlStream(in, false);
 
         // only output this node without parent and children
         String rootpath = "/preferences[@EXTERNAL_XML_VERSION='1.0']/root[@type='user']/node[@name='java']/node[@name='util']/node[@name='prefs']";
@@ -1116,6 +1116,7 @@
         // Create a builder factory
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setValidating(validating);
+        factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",
false);
 
         // Create the builder and parse the file
         DocumentBuilder builder = factory.newDocumentBuilder();
@@ -1144,7 +1145,7 @@
         byte[] result = out.toByteArray();
         // System.out.println(new String(result, "utf-8"));
         ByteArrayInputStream in = new ByteArrayInputStream(result);
-        Document doc = parseXmlStream(in, true);
+        Document doc = parseXmlStream(in, false);
 
         // only output this node and subtree without parent
         String rootpath = "/preferences[@EXTERNAL_XML_VERSION='1.0']/root[@type='user']/node[@name='java']/node[@name='util']/node[@name='prefs']";



Mime
View raw message