You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2006/04/06 10:08:57 UTC
svn commit: r391928 -
/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
Author: mmarinschek
Date: Thu Apr 6 01:08:55 2006
New Revision: 391928
URL: http://svn.apache.org/viewcvs?rev=391928&view=rev
Log:
fix for MYFACES-1270. Thanks to Olaf Fricke.
Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewcvs/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=391928&r1=391927&r2=391928&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java Thu Apr 6 01:08:55 2006
@@ -52,6 +52,7 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
+import java.net.URLConnection;
import java.util.*;
@@ -158,7 +159,7 @@
while (it.hasNext())
{
URL url = (URL)it.next();
- InputStream stream = url.openStream();
+ InputStream stream = openStreamWithoutCache(url);
InputStreamReader isr = new InputStreamReader(stream);
BufferedReader br = new BufferedReader(isr);
String className;
@@ -202,18 +203,25 @@
}
}
+ private InputStream openStreamWithoutCache(URL url)
+ throws IOException
+ {
+ URLConnection connection = url.openConnection();
+ connection.setUseCaches(false);
+ return connection.getInputStream();
+ }
/*private Map expandFactoryNames(Set factoryNames)
- {
- Map names = new HashMap();
- Iterator itr = factoryNames.iterator();
- while (itr.hasNext())
- {
- String name = (String) itr.next();
- names.put(META_INF_SERVICES_LOCATION + name, name);
- }
- return names;
- } */
+ {
+ Map names = new HashMap();
+ Iterator itr = factoryNames.iterator();
+ while (itr.hasNext())
+ {
+ String name = (String) itr.next();
+ names.put(META_INF_SERVICES_LOCATION + name, name);
+ }
+ return names;
+ } */
/**
@@ -227,7 +235,7 @@
while (it.hasNext())
{
URL url = (URL)it.next();
- InputStream stream = url.openStream();
+ InputStream stream = openStreamWithoutCache(url);
String systemId = url.toExternalForm();
if (log.isInfoEnabled()) log.info("Reading config " + systemId);
_dispenser.feed(_unmarshaller.getFacesConfig(stream, systemId));