directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r1178345 - in /directory/shared/trunk/ldap/extras/sp: pom.xml src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java
Date Mon, 03 Oct 2011 09:06:19 GMT
Author: felixk
Date: Mon Oct  3 09:06:18 2011
New Revision: 1178345

URL: http://svn.apache.org/viewvc?rev=1178345&view=rev
Log:
Finally close InputStream quietly

Modified:
    directory/shared/trunk/ldap/extras/sp/pom.xml
    directory/shared/trunk/ldap/extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java

Modified: directory/shared/trunk/ldap/extras/sp/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/sp/pom.xml?rev=1178345&r1=1178344&r2=1178345&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/sp/pom.xml (original)
+++ directory/shared/trunk/ldap/extras/sp/pom.xml Mon Oct  3 09:06:18 2011
@@ -66,6 +66,11 @@
       <groupId>${project.groupId}</groupId>
       <artifactId>shared-ldap-extras-util</artifactId>
     </dependency> 
+
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency> 
   </dependencies>
 
   <build>

Modified: directory/shared/trunk/ldap/extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java?rev=1178345&r1=1178344&r2=1178345&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java
(original)
+++ directory/shared/trunk/ldap/extras/sp/src/main/java/org/apache/directory/shared/ldap/sp/JavaStoredProcUtils.java
Mon Oct  3 09:06:18 2011
@@ -35,6 +35,7 @@ import javax.naming.ldap.ExtendedRespons
 import javax.naming.ldap.LdapContext;
 
 import org.apache.commons.lang.SerializationUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.codec.api.LdapApiServiceFactory;
 import org.apache.directory.shared.ldap.extras.extended.StoredProcedureRequestImpl;
@@ -80,7 +81,6 @@ public final class JavaStoredProcUtils
         try
         {
             in.read( buf );
-            in.close();
         }
         catch ( IOException e )
         {
@@ -88,6 +88,10 @@ public final class JavaStoredProcUtils
             ne.setRootCause( e );
             throw ne;
         }
+        finally
+        {
+        	IOUtils.closeQuietly( in );
+        }
 
         return buf;
     }



Mime
View raw message