directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1718435 - /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java
Date Mon, 07 Dec 2015 18:26:10 GMT
Author: elecharny
Date: Mon Dec  7 18:26:10 2015
New Revision: 1718435

URL: http://svn.apache.org/viewvc?rev=1718435&view=rev
Log:
Gather the errors in a better format for the LdifAnonymizer

Modified:
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java?rev=1718435&r1=1718434&r2=1718435&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdifAnonymizer.java
Mon Dec  7 18:26:10 2015
@@ -490,6 +490,7 @@ public class LdifAnonymizer
         LdifReader ldifReader = new LdifReader( inputFile, schemaManager );
         int count = 0;
         List<LdifEntry> errors = new ArrayList<LdifEntry>();
+        List<String> errorTexts = new ArrayList<String>();
 
         try
         {
@@ -566,6 +567,7 @@ public class LdifAnonymizer
                     }
                     
                     errors.add( ldifEntry );
+                    errorTexts.add( e.getMessage() );
                 }
             }
 
@@ -574,11 +576,14 @@ public class LdifAnonymizer
             if ( errors.size() != 0 )
             {
                 println( "There are " + errors.size() + " bad entries" );
+                int i = 0;
                 
                 for ( LdifEntry ldifEntry : errors )
                 {
                     println( "---------------------------------------------------" );
+                    println( "error : " + errorTexts.get( i ) );
                     println( ldifEntry.getDn().toString() );
+                    i++;
                 }
             }
         }



Mime
View raw message