directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r893144 - /directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
Date Tue, 22 Dec 2009 11:27:08 GMT
Author: elecharny
Date: Tue Dec 22 11:27:06 2009
New Revision: 893144

URL: http://svn.apache.org/viewvc?rev=893144&view=rev
Log:
closed some reader that were never closed...

Modified:
    directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java

Modified: directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java?rev=893144&r1=893143&r2=893144&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
Tue Dec 22 11:27:06 2009
@@ -1593,7 +1593,8 @@
         try
         {
             reader = new BufferedReader(
-                new InputStreamReader( new FileInputStream( file ), Charset.forName( encoding
) ) );
+                new InputStreamReader( 
+                    new FileInputStream( file ), Charset.forName( encoding ) ) );
 
             return parseLdif( reader );
         }
@@ -1607,7 +1608,10 @@
             // close the reader
             try
             {
-                close();
+                if ( reader != null )
+                {
+                    reader.close();
+                }
             }
             catch ( IOException ioe )
             {
@@ -1635,8 +1639,8 @@
             return new ArrayList<LdifEntry>();
         }
 
-        StringReader strIn = new StringReader( ldif );
-        BufferedReader reader = new BufferedReader( strIn );
+        BufferedReader reader = new BufferedReader( 
+            new StringReader( ldif ) );
 
         try
         {
@@ -1660,7 +1664,10 @@
             // Close the reader
             try
             {
-                close();
+                if ( reader != null )
+                {
+                    reader.close();
+                }
             }
             catch ( IOException ioe )
             {



Mime
View raw message