sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r1639262 - /sling/trunk/contrib/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationServiceImpl.java
Date Thu, 13 Nov 2014 07:55:08 GMT
Author: kwin
Date: Thu Nov 13 07:55:08 2014
New Revision: 1639262

URL: http://svn.apache.org/r1639262
Log:
SLING-4159, always close resource resolver (even in case of exceptions)

Modified:
    sling/trunk/contrib/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationServiceImpl.java

Modified: sling/trunk/contrib/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationServiceImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationServiceImpl.java?rev=1639262&r1=1639261&r2=1639262&view=diff
==============================================================================
--- sling/trunk/contrib/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationServiceImpl.java
(original)
+++ sling/trunk/contrib/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationServiceImpl.java
Thu Nov 13 07:55:08 2014
@@ -329,9 +329,10 @@ public class ValidationServiceImpl imple
             }
         } catch (LoginException e) {
             LOG.error("Unable to obtain a resource resolver.", e);
-        }
-        if (rr != null) {
-            rr.close();
+        } finally {
+            if (rr != null) {
+                rr.close();
+            }
         }
         return modelsForResourceType;
     }



Mime
View raw message