[lsc-changes] r518 - lsc/trunk/src/main/java/org/lsc/beans

jclarke at lsc-project.org jclarke at lsc-project.org
Mon Nov 30 20:57:42 CET 2009


Author: jclarke
Date: 2009-11-30 20:57:41 +0100 (Mon, 30 Nov 2009)
New Revision: 518

Modified:
   lsc/trunk/src/main/java/org/lsc/beans/AbstractBean.java
Log:
Avoid reinitializing previously initialized static attribute. Avoid excessive log warnings

Modified: lsc/trunk/src/main/java/org/lsc/beans/AbstractBean.java
===================================================================
--- lsc/trunk/src/main/java/org/lsc/beans/AbstractBean.java	2009-11-30 14:33:24 UTC (rev 517)
+++ lsc/trunk/src/main/java/org/lsc/beans/AbstractBean.java	2009-11-30 19:57:41 UTC (rev 518)
@@ -108,13 +108,16 @@
 	/** The list of local methods. */
 	private static Map<String, List<Method>> localMethods;
 
+	private static boolean warned = false;
+	
 	/**
 	 * The default constructor.
 	 */
 	public AbstractBean() {
-		localMethods = new HashMap<String, List<Method>>();
-
-		LOGGER.warn("Using deprecated class AbstractBean. Your setup will still work fine, but must be upgraded to use SimpleBean before upgrading to LSC 1.3.");
+		if (! warned) {
+			LOGGER.warn("Using deprecated class AbstractBean. Your setup will still work fine, but must be upgraded to use SimpleBean before upgrading to LSC 1.3.");
+			warned = true;
+		}
 	}
 
 	/**



More information about the lsc-changes mailing list