incubator-droids-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jav...@apache.org
Subject svn commit: r1188853 - /incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/net/RegexURLFilter.java
Date Tue, 25 Oct 2011 18:46:30 GMT
Author: javier
Date: Tue Oct 25 18:46:29 2011
New Revision: 1188853

URL: http://svn.apache.org/viewvc?rev=1188853&view=rev
Log:
Use finally to close the reader.

Modified:
    incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/net/RegexURLFilter.java

Modified: incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/net/RegexURLFilter.java
URL: http://svn.apache.org/viewvc/incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/net/RegexURLFilter.java?rev=1188853&r1=1188852&r2=1188853&view=diff
==============================================================================
--- incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/net/RegexURLFilter.java
(original)
+++ incubator/droids/trunk/droids-core/src/main/java/org/apache/droids/net/RegexURLFilter.java
Tue Oct 25 18:46:29 2011
@@ -91,8 +91,11 @@ public class RegexURLFilter implements U
     }
     log.debug("url " + url);
     Reader reader = new InputStreamReader(url.openStream());
-    rules.addAll( readRulesFile(reader) );
-    reader.close();
+    try {
+    	rules.addAll( readRulesFile(reader) );
+    } finally {
+    	reader.close();
+    }
   }
 
   private List<RegexRule> readRulesFile(Reader reader) throws IOException {



Mime
View raw message