portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r1466331 - in /portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src: main/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java test/java/org/apache/jetspeed/page/TestMappings.java
Date Wed, 10 Apr 2013 04:56:45 GMT
Author: rwatler
Date: Wed Apr 10 04:56:44 2013
New Revision: 1466331

URL: http://svn.apache.org/r1466331
Log:
Set SAX system property for jdk 1.4

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestMappings.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java?rev=1466331&r1=1466330&r2=1466331&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/main/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java
Wed Apr 10 04:56:44 2013
@@ -126,7 +126,13 @@ public class CastorFileSystemDocumentHan
         this.format = new OutputFormat("    ", true, PSML_DOCUMENT_ENCODING);
         this.format.setXHTML(true);
         this.format.setExpandEmptyElements(false);
-        
+
+        String javaVersion = System.getProperty("java.version");
+        if ((javaVersion.startsWith("1.3.") || javaVersion.startsWith("1.4.")) &&
(System.getProperty("org.xml.sax.driver") == null))
+        {
+            System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");
+            log.info("SAX driver configured: "+System.getProperty("org.xml.sax.driver"));
+        }        
         SAXParserFactory factory = SAXParserFactory.newInstance();
         SAXParser parser = factory.newSAXParser();
         

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestMappings.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestMappings.java?rev=1466331&r1=1466330&r2=1466331&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestMappings.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-page-manager/src/test/java/org/apache/jetspeed/page/TestMappings.java
Wed Apr 10 04:56:44 2013
@@ -38,6 +38,7 @@ public class TestMappings extends TestCa
                 "JETSPEED-INF/castor/page-mapping.xml")));
 
         // 2. Unmarshal the data
+        System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");
         Unmarshaller unmar = new Unmarshaller(mapping);
         Fragment fragment = (Fragment) unmar.unmarshal(new InputSource(getClass().getClassLoader().getResourceAsStream(
                 "fragment-test.xml")));



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message