[lsc-changes] r387 - in lsc/trunk/src/main/java/org/lsc/jndi: . parser

rschermesser at lsc-project.org rschermesser at lsc-project.org
Sat Nov 7 22:33:50 CET 2009


Author: rschermesser
Date: 2009-11-07 22:33:50 +0100 (Sat, 07 Nov 2009)
New Revision: 387

Modified:
   lsc/trunk/src/main/java/org/lsc/jndi/AbstractSimpleJndiService.java
   lsc/trunk/src/main/java/org/lsc/jndi/FullDNJndiDstService.java
   lsc/trunk/src/main/java/org/lsc/jndi/JndiServices.java
   lsc/trunk/src/main/java/org/lsc/jndi/ScriptableObject.java
   lsc/trunk/src/main/java/org/lsc/jndi/SimpleJndiDstService.java
   lsc/trunk/src/main/java/org/lsc/jndi/SimpleJndiSrcService.java
   lsc/trunk/src/main/java/org/lsc/jndi/parser/LdapAttributeType.java
   lsc/trunk/src/main/java/org/lsc/jndi/parser/LdapObjectClass.java
Log:
Remove references to log4j

Modified: lsc/trunk/src/main/java/org/lsc/jndi/AbstractSimpleJndiService.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/jndi/AbstractSimpleJndiService.java	2009-11-07 21:33:42 UTC (rev 386)
+++ lsc/trunk/src/main/java/org/lsc/jndi/AbstractSimpleJndiService.java	2009-11-07 21:33:50 UTC (rev 387)
@@ -80,7 +80,6 @@
  */
 public abstract class AbstractSimpleJndiService {
 
-	/** This is the local LOG4J logger. */
 	protected static final Logger LOGGER = LoggerFactory.
 					getLogger(AbstractSimpleJndiService.class);
 

Modified: lsc/trunk/src/main/java/org/lsc/jndi/FullDNJndiDstService.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/jndi/FullDNJndiDstService.java	2009-11-07 21:33:42 UTC (rev 386)
+++ lsc/trunk/src/main/java/org/lsc/jndi/FullDNJndiDstService.java	2009-11-07 21:33:50 UTC (rev 387)
@@ -82,7 +82,6 @@
      */
     private Class<AbstractBean> beanClass;
 
-    /** The local LOG4J logger. */
     private static final Logger LOGGER = LoggerFactory.getLogger(FullDNJndiDstService.class);
 
     /**

Modified: lsc/trunk/src/main/java/org/lsc/jndi/JndiServices.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/jndi/JndiServices.java	2009-11-07 21:33:42 UTC (rev 386)
+++ lsc/trunk/src/main/java/org/lsc/jndi/JndiServices.java	2009-11-07 21:33:50 UTC (rev 387)
@@ -97,7 +97,6 @@
     /** Default LDAP filter. */
     public static final String DEFAULT_FILTER = "objectClass=*";
 
-    /** the Log4J instance. */
     private static final Logger LOGGER = LoggerFactory.getLogger(JndiServices.class);
 
     /** the ldap ctx. */

Modified: lsc/trunk/src/main/java/org/lsc/jndi/ScriptableObject.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/jndi/ScriptableObject.java	2009-11-07 21:33:42 UTC (rev 386)
+++ lsc/trunk/src/main/java/org/lsc/jndi/ScriptableObject.java	2009-11-07 21:33:50 UTC (rev 387)
@@ -57,110 +57,107 @@
 import org.slf4j.LoggerFactory;
 import org.mozilla.javascript.NativeJavaObject;
 
-
 /**
  * Based on rhino, this class is able to understand your LQL requests.
  * @author Sebastien Bahloul &lt;seb at lsc-project.org&gt;
  */
 public class ScriptableObject {
-    /** The local static LOG4J logger. */
-    private static final Logger LOGGER = 
-	LoggerFactory.getLogger(ScriptableObject.class);
-    
-    @SuppressWarnings("unchecked")
-    public List<String> wrap(String methodName, final Object a, final Object b,
-                              boolean listable) throws NamingException {
-        Method method = null;
 
-        try {
-            List<String> aList = getList(a);
-            List<String> bList = getList(b);
+	private static final Logger LOGGER =
+					LoggerFactory.getLogger(ScriptableObject.class);
 
-            if (listable) {
-                method = this.getClass()
-                             .getDeclaredMethod( methodName, List.class, List.class );
+	@SuppressWarnings("unchecked")
+	public List<String> wrap(String methodName, final Object a, final Object b,
+					boolean listable) throws NamingException {
+		Method method = null;
 
-                return (List<String>) method.invoke(this, aList, bList );
-            } else {
-                if ((aList == null) || (bList == null)) {
-                    return null;
-                }
+		try {
+			List<String> aList = getList(a);
+			List<String> bList = getList(b);
 
-                method = this.getClass()
-                             .getDeclaredMethod(methodName, String.class, String.class);
+			if (listable) {
+				method = this.getClass().getDeclaredMethod(methodName, List.class, List.class);
 
-                List<String> results = new ArrayList<String>();
-                Iterator<String> aListIter = aList.iterator();
+				return (List<String>) method.invoke(this, aList, bList);
+			} else {
+				if ((aList == null) || (bList == null)) {
+					return null;
+				}
 
-                while (aListIter.hasNext()) {
-                    String aValue = aListIter.next();
-                    Iterator<String> bListIter = bList.iterator();
+				method = this.getClass().getDeclaredMethod(methodName, String.class, String.class);
 
-                    while (bListIter.hasNext()) {
-                        String bValue = bListIter.next();
-                        List<String> res = (List<String>) method.invoke(this, aValue, bValue);
+				List<String> results = new ArrayList<String>();
+				Iterator<String> aListIter = aList.iterator();
 
-                        if (res != null) {
-                            results.addAll(res);
-                        }
-                    }
-                }
+				while (aListIter.hasNext()) {
+					String aValue = aListIter.next();
+					Iterator<String> bListIter = bList.iterator();
 
-                return results;
-            }
-        } catch (SecurityException e) {
-            LOGGER.error("Programmatic error : " + e, e);
-        } catch (NoSuchMethodException e) {
-            LOGGER.error("Programmatic error : " + e, e);
-        } catch (IllegalArgumentException e) {
-            LOGGER.error("Programmatic error : " + e, e);
-        } catch (IllegalAccessException e) {
-            LOGGER.error("Programmatic error : " + e, e);
-        } catch (InvocationTargetException e) {
-            LOGGER.error("Programmatic error : " + e, e);
-        }
+					while (bListIter.hasNext()) {
+						String bValue = bListIter.next();
+						List<String> res = (List<String>) method.invoke(this, aValue, bValue);
 
-        return null;
-    }
+						if (res != null) {
+							results.addAll(res);
+						}
+					}
+				}
 
-    /**
-     * Convert objects to Strings list
-     *
-     * @param a the original object
-     *
-     * @return the strings list
-     */
-    @SuppressWarnings("unchecked")
-    public List<String> getList(final Object a) {
-        List<String> aList = null;
+				return results;
+			}
+		} catch (SecurityException e) {
+			LOGGER.error("Programmatic error : " + e, e);
+		} catch (NoSuchMethodException e) {
+			LOGGER.error("Programmatic error : " + e, e);
+		} catch (IllegalArgumentException e) {
+			LOGGER.error("Programmatic error : " + e, e);
+		} catch (IllegalAccessException e) {
+			LOGGER.error("Programmatic error : " + e, e);
+		} catch (InvocationTargetException e) {
+			LOGGER.error("Programmatic error : " + e, e);
+		}
 
-        if (a == null) {
-            return null;
-        } else if (String.class.isAssignableFrom(a.getClass())) {
-            aList = new ArrayList<String>();
-            aList.add((String) a);
+		return null;
+	}
 
-            return aList;
-        } else if (List.class.isAssignableFrom(a.getClass())) {
-            aList = (List<String>) a;
+	/**
+	 * Convert objects to Strings list
+	 *
+	 * @param a the original object
+	 *
+	 * @return the strings list
+	 */
+	@SuppressWarnings("unchecked")
+	public List<String> getList(final Object a) {
+		List<String> aList = null;
 
-            return aList;
-        } else if (NativeJavaObject.class.isAssignableFrom(a.getClass())) {
-            aList = getList(((NativeJavaObject) a).unwrap());
+		if (a == null) {
+			return null;
+		} else if (String.class.isAssignableFrom(a.getClass())) {
+			aList = new ArrayList<String>();
+			aList.add((String) a);
 
-            return aList;
-        }
+			return aList;
+		} else if (List.class.isAssignableFrom(a.getClass())) {
+			aList = (List<String>) a;
 
-        return null;
-    }
+			return aList;
+		} else if (NativeJavaObject.class.isAssignableFrom(a.getClass())) {
+			aList = getList(((NativeJavaObject) a).unwrap());
 
-    public List<String> wrapList(String methodName, final Object a, final Object b)
-                           throws NamingException {
-        return wrap(methodName, a, b, true);
-    }
+			return aList;
+		}
 
-    public List<String> wrapString(String methodName, final Object a, final Object b)
-                             throws NamingException {
-        return wrap(methodName, a, b, false);
-    }
+		return null;
+	}
+
+	public List<String> wrapList(String methodName, final Object a, final Object b)
+					throws NamingException {
+		return wrap(methodName, a, b, true);
+	}
+
+	public List<String> wrapString(String methodName, final Object a, final Object b)
+					throws NamingException {
+		return wrap(methodName, a, b, false);
+	}
 }

Modified: lsc/trunk/src/main/java/org/lsc/jndi/SimpleJndiDstService.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/jndi/SimpleJndiDstService.java	2009-11-07 21:33:42 UTC (rev 386)
+++ lsc/trunk/src/main/java/org/lsc/jndi/SimpleJndiDstService.java	2009-11-07 21:33:50 UTC (rev 387)
@@ -75,7 +75,6 @@
 	 */
 	private Class<AbstractBean> beanClass;
 
-	/** The local LOG4J logger. */
 	private static final Logger LOGGER = LoggerFactory.getLogger(SimpleJndiDstService.class);
 
 	/**

Modified: lsc/trunk/src/main/java/org/lsc/jndi/SimpleJndiSrcService.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/jndi/SimpleJndiSrcService.java	2009-11-07 21:33:42 UTC (rev 386)
+++ lsc/trunk/src/main/java/org/lsc/jndi/SimpleJndiSrcService.java	2009-11-07 21:33:50 UTC (rev 387)
@@ -69,9 +69,6 @@
  */
 public class SimpleJndiSrcService extends AbstractSimpleJndiService implements ISrcService {
 
-	/** The local LOG4J logger. */
-	private static final Logger LOGGER = LoggerFactory.getLogger(SimpleJndiSrcService.class);
-
 	/**
 	 * Constructor adapted to the context properties and the bean class name
 	 * to instantiate.

Modified: lsc/trunk/src/main/java/org/lsc/jndi/parser/LdapAttributeType.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/jndi/parser/LdapAttributeType.java	2009-11-07 21:33:42 UTC (rev 386)
+++ lsc/trunk/src/main/java/org/lsc/jndi/parser/LdapAttributeType.java	2009-11-07 21:33:50 UTC (rev 387)
@@ -111,7 +111,6 @@
 	/** The ordering rule applying to this attribute - or null. */
 	private String orderingRule;
 
-	/** The local LOG4J logger. */
 	private static final Logger LOGGER = LoggerFactory.getLogger(LdapAttributeType.class);
 
 	/**

Modified: lsc/trunk/src/main/java/org/lsc/jndi/parser/LdapObjectClass.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/jndi/parser/LdapObjectClass.java	2009-11-07 21:33:42 UTC (rev 386)
+++ lsc/trunk/src/main/java/org/lsc/jndi/parser/LdapObjectClass.java	2009-11-07 21:33:50 UTC (rev 387)
@@ -93,7 +93,6 @@
 	/** List of multi valued attributes. */
 	private List<String> multiAttrs;
 
-	/** The local LOG4J logger. */
 	private static final Logger LOGGER = LoggerFactory.getLogger(LdapAttributeType.class);
 
 	/**



More information about the lsc-changes mailing list