# HG changeset patch
# User Stefan Hühner <stefan.huehner@openbravo.com>
# Date 1499339919 -7200
#      Thu Jul 06 13:18:39 2017 +0200
# Node ID 4b7958ea14e3642f4998fbbd5672f5101f577261
# Parent  715e205e6f3de718e47b90da51dbc860803397ed
Fixed 36431. Cleanup logging: Removes uses of printStackTrace + System.*.print*

Cleanup some uses of bad logging + mention of same in comments.
In case of CryptoUtiliy, delete main method having bad usages (api-change).

diff -r 715e205e6f3d -r 4b7958ea14e3 modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java	Thu Jul 06 12:31:24 2017 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java	Thu Jul 06 13:18:39 2017 +0200
@@ -97,7 +97,6 @@
 
   public String generate() {
     final String jsCode = super.generate();
-    // System.err.println(jsCode);
     return jsCode;
   }
 
diff -r 715e205e6f3d -r 4b7958ea14e3 modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java	Thu Jul 06 12:31:24 2017 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java	Thu Jul 06 13:18:39 2017 +0200
@@ -180,7 +180,6 @@
       log.error(e.getMessage(), e);
       writeResult(response, JsonUtils.convertExceptionToJson(e));
     } catch (final Throwable t) {
-      t.printStackTrace(System.err);
       if (SessionHandler.isSessionHandlerPresent()) {
         SessionHandler.getInstance().setDoRollback(true);
       }
diff -r 715e205e6f3d -r 4b7958ea14e3 modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Thu Jul 06 12:31:24 2017 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Thu Jul 06 13:18:39 2017 +0200
@@ -108,9 +108,6 @@
       jsonResponse.put(JsonConstants.RESPONSE_DATA, new JSONArray(jsonObjects));
       jsonResult.put(JsonConstants.RESPONSE_RESPONSE, jsonResponse);
 
-      // if (jsonObjects.size() > 0) {
-      // System.err.println(jsonObjects.get(0));
-      // }
       return jsonResult.toString();
     } catch (JSONException e) {
       throw new OBException(e);
diff -r 715e205e6f3d -r 4b7958ea14e3 src-core/src/org/openbravo/utils/CryptoUtility.java
--- a/src-core/src/org/openbravo/utils/CryptoUtility.java	Thu Jul 06 12:31:24 2017 +0200
+++ b/src-core/src/org/openbravo/utils/CryptoUtility.java	Thu Jul 06 13:18:39 2017 +0200
@@ -24,16 +24,6 @@
   public CryptoUtility() {
   }
 
-  public static void main(String argv[]) throws Exception {
-    System.out.println("Enter encryption password:  ");
-    System.out.flush();
-    String clave = argv[0];
-    System.out.println("************* " + clave);
-    String strEnc = CryptoUtility.encrypt(clave);
-    System.out.println("ENCRYPTED TEXT: " + strEnc);
-    System.out.println("DECRYPTED TEXT: " + CryptoUtility.decrypt(strEnc));
-  }
-
   private static void initCipher() {
     try {
       s_key = new SecretKeySpec(new byte[] { 100, 25, 28, -122, -26, 94, -3, -72 }, "DES");
diff -r 715e205e6f3d -r 4b7958ea14e3 src/org/openbravo/dal/security/EntityAccessChecker.java
--- a/src/org/openbravo/dal/security/EntityAccessChecker.java	Thu Jul 06 12:31:24 2017 +0200
+++ b/src/org/openbravo/dal/security/EntityAccessChecker.java	Thu Jul 06 13:18:39 2017 +0200
@@ -372,8 +372,7 @@
   }
 
   /**
-   * Dumps the readable, writable, derived readable entities to the System.err outputstream. For
-   * debugging purposes.
+   * Dumps the readable, writable, derived readable entities. For debugging purposes.
    */
   public void dump() {
     log.info("");
