incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r425450 - /incubator/adffaces/branches/matzew-repackaging-trinidad/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/adfinternal/renderkit/FacesConfigInfo.java
Date Tue, 25 Jul 2006 16:37:56 GMT
Author: matzew
Date: Tue Jul 25 09:37:55 2006
New Revision: 425450

URL: http://svn.apache.org/viewvc?rev=425450&view=rev
Log:
brining svn commit: r425227 to branch

Modified:
    incubator/adffaces/branches/matzew-repackaging-trinidad/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/adfinternal/renderkit/FacesConfigInfo.java

Modified: incubator/adffaces/branches/matzew-repackaging-trinidad/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/adfinternal/renderkit/FacesConfigInfo.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/matzew-repackaging-trinidad/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/adfinternal/renderkit/FacesConfigInfo.java?rev=425450&r1=425449&r2=425450&view=diff
==============================================================================
--- incubator/adffaces/branches/matzew-repackaging-trinidad/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/adfinternal/renderkit/FacesConfigInfo.java
(original)
+++ incubator/adffaces/branches/matzew-repackaging-trinidad/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/adfinternal/renderkit/FacesConfigInfo.java
Tue Jul 25 09:37:55 2006
@@ -17,6 +17,8 @@
 
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import java.io.File;
+import java.io.FileInputStream;
 import java.io.InputStream;
 import java.io.IOException;
 import java.net.URL;
@@ -136,8 +138,21 @@
     while (resources.hasMoreElements())
     {
       URL resource = (URL) resources.nextElement();
-      System.out.println("PARSING " + resource);
-      InputStream inputStream = resource.openStream();
+      _LOG.info("PARSING " + resource);
+      InputStream inputStream = null;
+      // Try to get the inputStream off of a file
+      if ("file".equalsIgnoreCase(resource.getProtocol()))
+      {
+        File resourceFile = new File(resource.getFile().replaceAll("%20", " "));
+        if (resourceFile.exists())
+        {
+          inputStream = new FileInputStream(resourceFile);
+        }
+      }
+
+      if (inputStream == null)
+        inputStream = resource.openStream();
+
       try
       {
         InputSource source = new InputSource(inputStream);
@@ -178,4 +193,4 @@
 
   private static final ADFLogger _LOG =
     ADFLogger.createADFLogger(FacesConfigInfo.class);
-}
+}
\ No newline at end of file



Mime
View raw message