You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2010/12/17 16:01:15 UTC

svn commit: r1050411 - /felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java

Author: clement
Date: Fri Dec 17 15:01:14 2010
New Revision: 1050411

URL: http://svn.apache.org/viewvc?rev=1050411&view=rev
Log:
Lookup component classes in WEB-INF/classes if not found in the root.

Modified:
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java?rev=1050411&r1=1050410&r2=1050411&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java (original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java Fri Dec 17 15:01:14 2010
@@ -583,10 +583,14 @@ public class Pojoization {
             }
             JarEntry je = m_inputJar.getJarEntry(classname);
             if (je == null) {
-                throw new IOException("The class " + classname + " connot be found in the input Jar file");
-            } else {
-                return m_inputJar.getInputStream(je);
+            	// Try in WEB-INF/classes (WAR files)
+            	je = m_inputJar.getJarEntry("WEB-INF/classes/" + classname);
+            	if (je == null) {
+            		// If still null, throw an exception.
+            		throw new IOException("The class " + classname + " connot be found in the input Jar file");
+            	}
             }
+            return m_inputJar.getInputStream(je);
         } else {
             // Directory
             File file = new File(m_dir, classname);