commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1187557 - /commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/Digester.java
Date Fri, 21 Oct 2011 21:38:00 GMT
Author: simonetripodi
Date: Fri Oct 21 21:38:00 2011
New Revision: 1187557

URL: http://svn.apache.org/viewvc?rev=1187557&view=rev
Log:
fixed PMD violation: Avoid empty catch blocks (just logged exception, see in the comment why)

Modified:
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/Digester.java

Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/Digester.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/Digester.java?rev=1187557&r1=1187556&r2=1187557&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/Digester.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/Digester.java
Fri Oct 21 21:38:00 2011
@@ -2911,6 +2911,12 @@ public class Digester
             catch ( IOException e )
             {
                 // Fall through so we get them all
+                if ( log.isWarnEnabled() )
+                {
+                    log.warn( format( "An error occurred while closing resource %s (%s)",
+                                      source.getPublicId(),
+                                      source.getSystemId() ), e );
+                }
             }
         }
         inputSources.clear();



Mime
View raw message