[jboss-cvs] jboss-seam/src/main/org/jboss/seam/util ...
Gavin King
gavin.king at jboss.com
Mon Nov 13 19:15:02 EST 2006
User: gavin
Date: 06/11/13 19:15:02
Modified: src/main/org/jboss/seam/util Resources.java
Log:
introduced jar-level and package-level components.xml
autodetect seam components via META-INF/components.xml files
Revision Changes Path
1.5 +18 -18 jboss-seam/src/main/org/jboss/seam/util/Resources.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Resources.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/util/Resources.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- Resources.java 10 Jun 2006 07:08:47 -0000 1.4
+++ Resources.java 14 Nov 2006 00:15:02 -0000 1.5
@@ -24,28 +24,12 @@
if (stream==null)
{
- stream = getResourceAsString(resource, stripped);
+ stream = getResourceAsStream(resource, stripped);
}
return stream;
}
- private static InputStream getResourceAsString(String resource, String stripped)
- {
- ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- InputStream stream = null;
- if (classLoader!=null) {
- stream = classLoader.getResourceAsStream( stripped );
- }
- if ( stream == null ) {
- Seam.class.getResourceAsStream( resource );
- }
- if ( stream == null ) {
- stream = Seam.class.getClassLoader().getResourceAsStream( stripped );
- }
- return stream;
- }
-
public static InputStream getResourceAsStream(String resource, ServletContext servletContext) {
String stripped = resource.startsWith("/") ?
resource.substring(1) : resource;
@@ -60,10 +44,26 @@
if (stream==null)
{
- stream = getResourceAsString(resource, stripped);
+ stream = getResourceAsStream(resource, stripped);
}
return stream;
}
+ private static InputStream getResourceAsStream(String resource, String stripped)
+ {
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ InputStream stream = null;
+ if (classLoader!=null) {
+ stream = classLoader.getResourceAsStream(stripped);
+ }
+ if ( stream == null ) {
+ Seam.class.getResourceAsStream(resource);
+ }
+ if ( stream == null ) {
+ stream = Seam.class.getClassLoader().getResourceAsStream(stripped);
+ }
+ return stream;
+ }
+
}
More information about the jboss-cvs-commits
mailing list