commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator ValidatorResourcesInitializer.java
Date Sat, 15 Mar 2003 23:14:10 GMT
dgraham     2003/03/15 15:14:10

  Modified:    validator/src/share/org/apache/commons/validator
                        ValidatorResourcesInitializer.java
  Log:
  Added braces to one line blocks.  Cleaned up closing the InputStream.
  
  Revision  Changes    Path
  1.13      +10 -8     jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResourcesInitializer.java
  
  Index: ValidatorResourcesInitializer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/ValidatorResourcesInitializer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ValidatorResourcesInitializer.java	12 Mar 2003 06:06:46 -0000	1.12
  +++ ValidatorResourcesInitializer.java	15 Mar 2003 23:14:10 -0000	1.13
  @@ -160,8 +160,9 @@
         // register DTDs
         for (int i = 0; i < registrations.length; i += 2) {
             URL url = ValidatorResourcesInitializer.class.getResource(registrations[i+1]);
  -          if (url != null)
  +          if (url != null) {
                 digester.register(registrations[i], url.toString());
  +          }
         }
         
         digester.setUseContextClassLoader(true);
  @@ -256,12 +257,13 @@
         try {
            // Parse the input stream to initialize our database
            digester.parse(in);
  -         in.close();
  +         
         } catch (SAXException e) {
             log.error(e.getMessage(), e);
         } finally {
  -      	 if (in != null)
  -            try {in.close(); } catch (Exception e) {}
  +        if (in != null) {
  +            in.close();
  +        }
         }
         
         if (process) {
  
  
  

---------------------------------------------------------------------
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