[jboss-cvs] jboss-seam/src/main/org/jboss/seam/init ...
Gavin King
gavin.king at jboss.com
Fri Jun 22 17:57:00 EDT 2007
User: gavin
Date: 07/06/22 17:57:00
Modified: src/main/org/jboss/seam/init Initialization.java
Log:
ws
Revision Changes Path
1.184 +21 -10 jboss-seam/src/main/org/jboss/seam/init/Initialization.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Initialization.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/init/Initialization.java,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -b -r1.183 -r1.184
--- Initialization.java 21 Jun 2007 05:27:28 -0000 1.183
+++ Initialization.java 22 Jun 2007 21:57:00 -0000 1.184
@@ -619,17 +619,21 @@
};
Set<Class<Object>> scannedClasses = new HashSet<Class<Object>>();
- for (ComponentScanner scanner: scanners) {
+ for (ComponentScanner scanner: scanners)
+ {
scannedClasses.addAll(scanner.getClasses());
}
- for (Class<Object> scannedClass: scannedClasses) {
+ for (Class<Object> scannedClass: scannedClasses)
+ {
installScannedComponentAndRoles(scannedClass);
}
- for (ComponentScanner scanner: scanners) {
- for (String name: scanner.getResources()) {
- installComponentsFromDescriptor(name, scanner.getClassLoader());
+ for (ComponentScanner scanner: scanners)
+ {
+ for ( String name: scanner.getResources() )
+ {
+ installComponentsFromDescriptor( name, scanner.getClassLoader() );
}
}
}
@@ -648,19 +652,26 @@
{
//note: this is correct, we do not need to scan other classloaders!
InputStream stream = loader.getResourceAsStream(fileName);
- if (stream != null) {
- try {
+ if (stream != null)
+ {
+ try
+ {
Properties replacements = getReplacements();
Element root = XML.getRootElement(stream);
- if (root.getName().equals("components")) {
+ if (root.getName().equals("components"))
+ {
installComponentsFromXmlElements(root, replacements);
- } else{
+ }
+ else
+ {
installComponentFromXmlElement(root,
root.attributeValue("name"),
classFilenameFromDescriptor(fileName),
replacements);
}
- } catch (Exception e) {
+ }
+ catch (Exception e)
+ {
throw new RuntimeException("error while reading " + fileName, e);
}
}
More information about the jboss-cvs-commits
mailing list