directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r280847 - in /directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common: filter/FilterParserImpl.java message/LockableAttributeImpl.java schema/NormalizingComparator.java
Date Wed, 14 Sep 2005 13:26:54 GMT
Author: trustin
Date: Wed Sep 14 06:26:50 2005
New Revision: 280847

URL: http://svn.apache.org/viewcvs?rev=280847&view=rev
Log:
Replaced calls to printStackTrace() with SLF4J calls. (Look at DIREVE-161)

Modified:
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/FilterParserImpl.java
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributeImpl.java
    directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/schema/NormalizingComparator.java

Modified: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/FilterParserImpl.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/FilterParserImpl.java?rev=280847&r1=280846&r2=280847&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/FilterParserImpl.java
(original)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/filter/FilterParserImpl.java
Wed Sep 14 06:26:50 2005
@@ -62,7 +62,7 @@
         catch ( IOException e )
         {
             // this never blows chuncks and if it does we report!
-            e.printStackTrace();
+            throw new InternalError();
         }
 
         this.state = new LexerSharedInputState( pipeTail );

Modified: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributeImpl.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributeImpl.java?rev=280847&r1=280846&r2=280847&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributeImpl.java
(original)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/message/LockableAttributeImpl.java
Wed Sep 14 06:26:50 2005
@@ -17,16 +17,18 @@
 package org.apache.ldap.common.message ;
 
 
-import java.util.ArrayList ;
+import java.util.ArrayList;
 
-import javax.naming.NamingException ;
-import javax.naming.NamingEnumeration ;
-import javax.naming.directory.DirContext ;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.OperationNotSupportedException;
 import javax.naming.directory.Attribute;
-import javax.naming.OperationNotSupportedException ;
+import javax.naming.directory.DirContext;
 
-import org.apache.ldap.common.Lockable ;
-import org.apache.ldap.common.AbstractLockable ;
+import org.apache.ldap.common.AbstractLockable;
+import org.apache.ldap.common.Lockable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -38,7 +40,9 @@
 public class LockableAttributeImpl
     extends AbstractLockable implements LockableAttribute
 {
-    static final long serialVersionUID = -5158233254341746514L;
+    private static final Logger log = LoggerFactory.getLogger( LockableAttributeImpl.class
);
+
+    private static final long serialVersionUID = -5158233254341746514L;
     /** the name of the attribute */
     private final String id ;
     /** the list of attribute values */
@@ -416,7 +420,7 @@
 //                }
 //                catch ( NamingException e )
 //                {
-//                    e.printStackTrace();
+//                    log.warn( "Failed to get an attribute from the specifid attribute:
" + attr, e );
 //                    return false;
 //                }
 //            }
@@ -434,7 +438,7 @@
                 }
                 catch ( NamingException e )
                 {
-                    e.printStackTrace();
+                    log.warn( "Failed to get an attribute from the specifid attribute: "
+ attr, e );
                     return false;
                 }
             }

Modified: directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/schema/NormalizingComparator.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/schema/NormalizingComparator.java?rev=280847&r1=280846&r2=280847&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/schema/NormalizingComparator.java
(original)
+++ directory/shared/ldap/trunk/common/src/java/org/apache/ldap/common/schema/NormalizingComparator.java
Wed Sep 14 06:26:50 2005
@@ -20,6 +20,9 @@
 import java.util.Comparator;
 import javax.naming.NamingException;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * A comparator which normalizes a value first before using a subordinate
@@ -30,6 +33,7 @@
  */
 public class NormalizingComparator implements Comparator
 {
+    private static final Logger log = LoggerFactory.getLogger( NormalizingComparator.class
);
     /** the Normalizer to normalize values with before comparing */
     private Normalizer normalizer;
     /** the underlying comparator to use for comparisons */
@@ -66,7 +70,7 @@
         }
         catch ( NamingException e )
         {
-            e.printStackTrace();
+            log.warn( "Failed to normalize: " + o1, e );
             n1 = o1;
         }
 
@@ -76,7 +80,7 @@
         }
         catch ( NamingException e )
         {
-            e.printStackTrace();
+            log.warn( "Failed to normalize: " + o2, e );
             n2 = o2;
         }
 



Mime
View raw message