[jboss-cvs] JBossAS SVN: r63707 - trunk/ejb3/src/main/org/jboss/ejb3/deployers.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 28 07:24:22 EDT 2007


Author: wolfc
Date: 2007-06-28 07:24:22 -0400 (Thu, 28 Jun 2007)
New Revision: 63707

Modified:
   trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
Log:
EJBTHREE-724: constructing correct relative url

Modified: trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java	2007-06-28 10:13:22 UTC (rev 63706)
+++ trunk/ejb3/src/main/org/jboss/ejb3/deployers/JBoss5DeploymentUnit.java	2007-06-28 11:24:22 UTC (rev 63707)
@@ -73,19 +73,9 @@
       {
          try
          {
-            if (jar.startsWith(".."))
-            {
-               if (getUrl() == null)
-                  throw new RuntimeException("relative <jar-file> not allowed when standalone deployment unit is used");
-               String tmpjar = jar.substring(3);
-               VirtualFile vf = getRootFile().getParent().findChild(tmpjar);
-               return vf.toURL();
-            }
-            else
-            {
-               File fp = new File(jar);
-               return fp.toURL();
-            }
+            if (getUrl() == null)
+               throw new RuntimeException("relative <jar-file> not allowed when standalone deployment unit is used");
+            return new URL(getUrl(), jar);
          }
          catch (Exception e1)
          {




More information about the jboss-cvs-commits mailing list