dion        2003/01/11 02:12:11

  Modified:    jelly/src/java/org/apache/commons/jelly JellyContext.java
  Log:
  Undo change I made allowing fully qualified files for a uri
  
  Revision  Changes    Path
  1.39      +5 -13     
jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/JellyContext.java
  
  Index: JellyContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/JellyContext.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- JellyContext.java 11 Jan 2003 04:06:43 -0000      1.38
  +++ JellyContext.java 11 Jan 2003 10:12:11 -0000      1.39
  @@ -597,20 +597,12 @@
                   return new URL(uri);
               }
               catch (MalformedURLException e) {
  -             // try for a fully qualified file first
  -             File nonRelativeFile = new File(uri);
  -             if (nonRelativeFile.exists() && nonRelativeFile.canRead()) {
  -                    return nonRelativeFile.toURL();
  +                // lets try find a relative resource
  +                try {
  +                    return createRelativeURL(currentURL, uri);
  +                } catch (MalformedURLException e2) {
  +                    throw e;
                   }
  -             else {
  -                    // lets try find a relative resource
  -                    try {
  -                        return createRelativeURL(currentURL, uri);
  -                    } 
  -                    catch (MalformedURLException e2) {
  -                        throw e;
  -                    }
  -                             }
               }
           }
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to