[seam-commits] Seam SVN: r7203 - trunk/src/main/org/jboss/seam/deployment.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Jan 23 08:47:39 EST 2008


Author: pete.muir at jboss.org
Date: 2008-01-23 08:47:39 -0500 (Wed, 23 Jan 2008)
New Revision: 7203

Modified:
   trunk/src/main/org/jboss/seam/deployment/AbstractDeploymentHandler.java
Log:
Better exception

Modified: trunk/src/main/org/jboss/seam/deployment/AbstractDeploymentHandler.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/AbstractDeploymentHandler.java	2008-01-23 13:35:46 UTC (rev 7202)
+++ trunk/src/main/org/jboss/seam/deployment/AbstractDeploymentHandler.java	2008-01-23 13:47:39 UTC (rev 7203)
@@ -31,8 +31,16 @@
     */
    protected ClassFile getClassFile(String name, ClassLoader classLoader) throws IOException 
    {
+      if (name == null)
+      {
+         throw new NullPointerException("name cannot be null");
+      }
       InputStream stream = classLoader.getResourceAsStream(name);
-      DataInputStream dstream = new DataInputStream(stream); 
+      if (stream == null)
+      {
+         throw new IllegalStateException("Cannot load " + name + " from " + classLoader + " using getResourceAsStream()");
+      }
+      DataInputStream dstream = new DataInputStream(stream);
 
       try 
       { 




More information about the seam-commits mailing list