Issue 30053. Part 2: Cleanup unnecessary slf4j / log4j loggers
authorStefan Hühner <stefan.huehner@openbravo.com>
Sat, 30 May 2015 20:29:02 +0200
changeset 26840 4408556e4cb4
parent 26839 adda5d230a5e
child 26841 cb3442689716
Issue 30053. Part 2: Cleanup unnecessary slf4j / log4j loggers

Remove those where they are private and never used in the file.
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/MatchStatementOnLoadPreferenceActionHandler.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_FinaccTransactionEventListener.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentSelectorFilterExpression.java
modules/org.openbravo.client.application/src/org/openbravo/client/application/event/TableTreeEventHandler.java
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/GetNameGeneralLedger.java
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/GetLabelActionHandler.java
modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/SetContextInfoActionHandler.java
modules/org.openbravo.client.myob/src/org/openbravo/client/myob/CalendarWidgetProvider.java
src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransactionTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocLine_FINPayment.java
src/org/openbravo/erpCommon/utility/LeftTabsBar.java
src/org/openbravo/erpCommon/utility/NavigationBar.java
src/org/openbravo/erpCommon/utility/ToolBar.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintInvoices.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintOrders.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintQuotations.java
src/org/openbravo/erpCommon/utility/reporting/printing/PrintShipments.java
src/org/openbravo/service/system/ApplicationDictionaryValidator.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/MatchStatementOnLoadPreferenceActionHandler.java	Sat May 30 20:07:50 2015 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/MatchStatementOnLoadPreferenceActionHandler.java	Sat May 30 20:29:02 2015 +0200
@@ -27,12 +27,8 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.ad.domain.Preference;
 import org.openbravo.model.common.enterprise.Organization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class MatchStatementOnLoadPreferenceActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(MatchStatementOnLoadPreferenceActionHandler.class);
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_FinaccTransactionEventListener.java	Sat May 30 20:07:50 2015 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_FinaccTransactionEventListener.java	Sat May 30 20:29:02 2015 +0200
@@ -33,12 +33,8 @@
 import org.openbravo.model.financialmgmt.gl.GLItem;
 import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class FIN_FinaccTransactionEventListener extends EntityPersistenceEventObserver {
-  private static final Logger logger = LoggerFactory
-      .getLogger(FIN_FinaccTransactionEventListener.class);
 
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(
       FIN_FinaccTransaction.ENTITY_NAME) };
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentSelectorFilterExpression.java	Sat May 30 20:07:50 2015 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentSelectorFilterExpression.java	Sat May 30 20:29:02 2015 +0200
@@ -23,7 +23,6 @@
 
 import javax.servlet.http.HttpSession;
 
-import org.apache.log4j.Logger;
 import org.openbravo.client.application.FilterExpression;
 import org.openbravo.client.application.OBBindingsConstants;
 import org.openbravo.client.kernel.RequestContext;
@@ -31,7 +30,6 @@
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 
 public class PaymentSelectorFilterExpression implements FilterExpression {
-  private Logger log = Logger.getLogger(PaymentSelectorFilterExpression.class);
   private Map<String, String> requestMap;
   private HttpSession httpSession;
   private String windowId;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/TableTreeEventHandler.java	Sat May 30 20:07:50 2015 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/TableTreeEventHandler.java	Sat May 30 20:29:02 2015 +0200
@@ -37,8 +37,6 @@
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.utility.TableTree;
 import org.openbravo.service.db.DalConnectionProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * This event handler listen to events that are fired in the TableTree table. This table is used to
@@ -50,7 +48,6 @@
 public class TableTreeEventHandler extends EntityPersistenceEventObserver {
 
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(TableTree.ENTITY_NAME) };
-  private static Logger logger = LoggerFactory.getLogger(TableTreeEventHandler.class);
   private static final String ADTREE_STRUCTURE = "ADTree";
 
   @Override
@@ -82,10 +79,15 @@
   }
 
   /**
-   * Checks that no other ADTree structured tree exists for this table, throws an exception if this occurs
-   * @param table table being checked
-   * @param treeStructure treestructure of the added/updated tree
-   * @param recordId null if a new record is being created or id of the record being modified
+   * Checks that no other ADTree structured tree exists for this table, throws an exception if this
+   * occurs
+   * 
+   * @param table
+   *          table being checked
+   * @param treeStructure
+   *          treestructure of the added/updated tree
+   * @param recordId
+   *          null if a new record is being created or id of the record being modified
    */
   private void checkTreeStructure(Table table, String treeStructure, String recordId) {
     if (ADTREE_STRUCTURE.equals(treeStructure)) {
@@ -94,7 +96,7 @@
       obq.add(Restrictions.eq(TableTree.PROPERTY_TABLE, table));
       obq.add(Restrictions.eq(TableTree.PROPERTY_TREESTRUCTURE, treeStructure));
       if (recordId != null) {
-          obq.add(Restrictions.ne(TableTree.PROPERTY_ID, recordId));
+        obq.add(Restrictions.ne(TableTree.PROPERTY_ID, recordId));
       }
       if (obq.count() > 0) {
         String language = OBContext.getOBContext().getLanguage().getLanguage();
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/GetNameGeneralLedger.java	Sat May 30 20:07:50 2015 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/GetNameGeneralLedger.java	Sat May 30 20:29:02 2015 +0200
@@ -20,7 +20,6 @@
 
 import java.util.Map;
 
-import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.client.kernel.BaseActionHandler;
@@ -30,8 +29,6 @@
 
 public class GetNameGeneralLedger extends BaseActionHandler {
 
-  private static final Logger log = Logger.getLogger(GetNameGeneralLedger.class);
-
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
     OBContext.setAdminMode();
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/GetLabelActionHandler.java	Sat May 30 20:07:50 2015 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/GetLabelActionHandler.java	Sat May 30 20:29:02 2015 +0200
@@ -22,7 +22,6 @@
 
 import javax.enterprise.context.ApplicationScoped;
 
-import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.dal.core.OBContext;
@@ -34,7 +33,6 @@
  */
 @ApplicationScoped
 public class GetLabelActionHandler extends BaseActionHandler {
-  private static final Logger log = Logger.getLogger(GetLabelActionHandler.class);
 
   private static final String KEY_PARAMETER = "key";
   private static final String LABEL_PROPERTY = "label";
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/SetContextInfoActionHandler.java	Sat May 30 20:07:50 2015 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/SetContextInfoActionHandler.java	Sat May 30 20:29:02 2015 +0200
@@ -4,7 +4,6 @@
 
 import javax.enterprise.context.ApplicationScoped;
 
-import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -18,8 +17,6 @@
 @ApplicationScoped
 public class SetContextInfoActionHandler extends BaseActionHandler {
 
-  private static final Logger log = Logger.getLogger(SetContextInfoActionHandler.class);
-
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
 
--- a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/CalendarWidgetProvider.java	Sat May 30 20:07:50 2015 +0200
+++ b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/CalendarWidgetProvider.java	Sat May 30 20:29:02 2015 +0200
@@ -18,7 +18,6 @@
  */
 package org.openbravo.client.myob;
 
-import org.apache.log4j.Logger;
 import org.openbravo.client.kernel.KernelConstants;
 
 /**
@@ -30,8 +29,6 @@
 
   public static final String WIDGETCLASS_PARAMETER = "WIDGET_CLASS";
 
-  private static final Logger log = Logger.getLogger(CalendarWidgetProvider.class);
-
   @Override
   public String generate() {
     final String result = "isc.defineClass('" + KernelConstants.ID_PREFIX
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransactionTemplate.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransactionTemplate.java	Sat May 30 20:29:02 2015 +0200
@@ -22,13 +22,10 @@
 
 import javax.servlet.ServletException;
 
-import org.apache.log4j.Logger;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.database.ConnectionProvider;
 
 public abstract class DocFINFinAccTransactionTemplate {
-  private static final Logger log4jDocFINFinAccTransactionTemplate = Logger
-      .getLogger(DocFINFinAccTransactionTemplate.class);
 
   /**
    * Constructor
--- a/src/org/openbravo/erpCommon/ad_forms/DocLine_FINPayment.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLine_FINPayment.java	Sat May 30 20:29:02 2015 +0200
@@ -20,12 +20,10 @@
 
 import java.math.BigDecimal;
 
-import org.apache.log4j.Logger;
 import org.openbravo.model.common.invoice.Invoice;
 import org.openbravo.model.common.order.Order;
 
 public class DocLine_FINPayment extends DocLineCashVATReady_PaymentTransactionReconciliation {
-  private static final Logger log4j = Logger.getLogger(DocLine_FINPayment.class);
 
   String Line_ID = "";
   String Amount = "";
--- a/src/org/openbravo/erpCommon/utility/LeftTabsBar.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/erpCommon/utility/LeftTabsBar.java	Sat May 30 20:29:02 2015 +0200
@@ -18,11 +18,9 @@
  */
 package org.openbravo.erpCommon.utility;
 
-import org.apache.log4j.Logger;
 import org.openbravo.database.ConnectionProvider;
 
 public class LeftTabsBar {
-  private static Logger log4j = Logger.getLogger(LeftTabsBar.class);
   private ConnectionProvider conn;
   private String language = "en_US";
   private String servlet_action = "";
--- a/src/org/openbravo/erpCommon/utility/NavigationBar.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/erpCommon/utility/NavigationBar.java	Sat May 30 20:29:02 2015 +0200
@@ -18,11 +18,9 @@
  */
 package org.openbravo.erpCommon.utility;
 
-import org.apache.log4j.Logger;
 import org.openbravo.database.ConnectionProvider;
 
 public class NavigationBar {
-  private static Logger log4j = Logger.getLogger(NavigationBar.class);
   private ConnectionProvider conn;
   private String language = "en_US";
   private String servlet_action = "";
--- a/src/org/openbravo/erpCommon/utility/ToolBar.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/erpCommon/utility/ToolBar.java	Sat May 30 20:29:02 2015 +0200
@@ -21,7 +21,6 @@
 import java.util.Hashtable;
 import java.util.Vector;
 
-import org.apache.log4j.Logger;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ConnectionProvider;
@@ -29,7 +28,6 @@
 import org.openbravo.model.ad.ui.Tab;
 
 public class ToolBar {
-  private static Logger log4j = Logger.getLogger(ToolBar.class);
   private ConnectionProvider conn;
   private String language = "en_US";
   private String servlet_action = "";
--- a/src/org/openbravo/erpCommon/utility/reporting/printing/PrintInvoices.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/erpCommon/utility/reporting/printing/PrintInvoices.java	Sat May 30 20:29:02 2015 +0200
@@ -22,13 +22,11 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.log4j.Logger;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.erpCommon.utility.reporting.DocumentType;
 
 @SuppressWarnings("serial")
 public class PrintInvoices extends PrintController {
-  private static Logger log4j = Logger.getLogger(PrintInvoices.class);
 
   // TODO: Als een email in draft staat de velden voor de email adressen
   // weghalen en melden dat het document
--- a/src/org/openbravo/erpCommon/utility/reporting/printing/PrintOrders.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/erpCommon/utility/reporting/printing/PrintOrders.java	Sat May 30 20:29:02 2015 +0200
@@ -22,13 +22,11 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.log4j.Logger;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.erpCommon.utility.reporting.DocumentType;
 
 @SuppressWarnings("serial")
 public class PrintOrders extends PrintController {
-  private static Logger log4j = Logger.getLogger(PrintOrders.class);
 
   // TODO: Als een email in draft staat de velden voor de email adressen
   // weghalen en melden dat het document
--- a/src/org/openbravo/erpCommon/utility/reporting/printing/PrintQuotations.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/erpCommon/utility/reporting/printing/PrintQuotations.java	Sat May 30 20:29:02 2015 +0200
@@ -22,13 +22,11 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.log4j.Logger;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.erpCommon.utility.reporting.DocumentType;
 
 @SuppressWarnings("serial")
 public class PrintQuotations extends PrintController {
-  private static Logger log4j = Logger.getLogger(PrintQuotations.class);
 
   // TODO: Als een email in draft staat de velden voor de email adressen
   // weghalen en melden dat het document
--- a/src/org/openbravo/erpCommon/utility/reporting/printing/PrintShipments.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/erpCommon/utility/reporting/printing/PrintShipments.java	Sat May 30 20:29:02 2015 +0200
@@ -22,13 +22,11 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.log4j.Logger;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.erpCommon.utility.reporting.DocumentType;
 
 @SuppressWarnings("serial")
 public class PrintShipments extends PrintController {
-  private static Logger log4j = Logger.getLogger(PrintShipments.class);
 
   // TODO: Als een email in draft staat de velden voor de email adressen
   // weghalen en melden dat het document
--- a/src/org/openbravo/service/system/ApplicationDictionaryValidator.java	Sat May 30 20:07:50 2015 +0200
+++ b/src/org/openbravo/service/system/ApplicationDictionaryValidator.java	Sat May 30 20:29:02 2015 +0200
@@ -24,8 +24,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
-
 /**
  * This class validates several aspects of the application dictionary. The application dictionary
  * itself is validated as well as the match between the application dictionary and the database.
@@ -33,7 +31,6 @@
  * @author mtaal
  */
 public class ApplicationDictionaryValidator {
-  private static final Logger log = Logger.getLogger(ApplicationDictionaryValidator.class);
 
   private List<SystemValidator> validators = new ArrayList<SystemValidator>();