commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly Jelly.java
Date Tue, 31 Aug 2004 06:50:03 GMT
dion        2004/08/30 23:50:03

  Modified:    jelly/src/java/org/apache/commons/jelly Jelly.java
  Log:
  PMD readability
  
  Revision  Changes    Path
  1.30      +12 -15    jakarta-commons/jelly/src/java/org/apache/commons/jelly/Jelly.java
  
  Index: Jelly.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/Jelly.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Jelly.java	24 Feb 2004 14:15:40 -0000	1.29
  +++ Jelly.java	31 Aug 2004 06:50:03 -0000	1.30
  @@ -93,11 +93,10 @@
           catch (JellyException e) {
               Throwable cause = e.getCause();
   
  -            if (cause != null) {
  -                cause.printStackTrace();
  -            }
  -            else {
  +            if (cause == null) {
                   e.printStackTrace();
  +            } else {
  +                cause.printStackTrace();
               }
           }
       }
  @@ -219,17 +218,15 @@
       protected URL resolveURL(String name) throws MalformedURLException {
           
           URL url = this.getClass().getClassLoader().getResource(name);
  -        if (url != null)
  +        if (url == null)
           {
  -          return url;
  -        }
  -        else
  -        {
  -          File file = new File(name);
  -          if (file.exists()) {
  -              return file.toURL();
  -          }
  -          return new URL(name);
  +            File file = new File(name);
  +            if (file.exists()) {
  +                return file.toURL();
  +            }
  +            return new URL(name);
  +        } else {
  +            return url;
           }
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message