Openbravo Issue Tracking System - Retail Modules
View Issue Details
0047967Retail ModulesWeb POSpublic2021-11-03 14:212021-11-04 08:17
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
RR22Q1 
marvintm
No
0047967: Several files in posterminal are using bad logging (printStrace or System.out.println)

- org/openbravo/retail/posterminal/master/Cashup.java
- org/openbravo/retail/posterminal/process/CustomerStatistics.java
  Both Move from printStackTrace to log4j.error

- org/openbravo/retail/posterminal/CashupHook.java
  org/openbravo/retail/posterminal/CustomerAddrCreationHook.java
  org/openbravo/retail/posterminal/CustomerLoaderHook.java
  org/openbravo/retail/posterminal/OrderLoaderHook.java
  org/openbravo/retail/posterminal/VoidLayawayHook.java
  org/openbravo/retail/posterminal/ad_reports/CashupReportHook.java

All had System.out.println("somebody is calling me") inside commented out example code on how to implement those hooks.
To avoid having bad code-example replace that by just a source-code comment

- org/openbravo/retail/posterminal/CashupHook.java
  org/openbravo/retail/posterminal/ad_reports/CashupReportHook.java
  
Additionally in those two files the method signature of the example code did not match the interface to be implemented.
Fix that up as well
https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/blob/master/src/org/openbravo/retail/discounts/AddPack.java#L113 [^]
move it to log4j.debug (as just debugging output anyway)
No tags attached.
blocks design defect 0036162 acknowledged Triage Platform Base Openbravo ERP clean up openbravo.log 
Issue History
2021-11-03 14:21shuehnerNew Issue
2021-11-03 14:21shuehnerAssigned To => Retail
2021-11-03 14:21shuehnerTriggers an Emergency Pack => No
2021-11-03 14:21shuehnerIssue generated from0047964
2021-11-03 14:22shuehnerRelationship addedblocks 0036162
2021-11-03 14:25hgbotNote Added: 0132814
2021-11-04 08:14hgbotNote Added: 0132820
2021-11-04 08:14hgbotNote Added: 0132821
2021-11-04 08:16marvintmStatusnew => scheduled
2021-11-04 08:16marvintmAssigned ToRetail => shuehner
2021-11-04 08:16marvintmStatusscheduled => resolved
2021-11-04 08:16marvintmFixed in Version => RR22Q1
2021-11-04 08:16marvintmResolutionopen => fixed
2021-11-04 08:17marvintmReview Assigned To => marvintm
2021-11-04 08:17marvintmStatusresolved => closed

Notes
(0132814)
hgbot   
2021-11-03 14:25   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/617 [^]
(0132820)
hgbot   
2021-11-04 08:14   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: a8327b770263f43cd81271cf103529830863c9d7
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 2021-11-04T08:09:38+01:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/a8327b770263f43cd81271cf103529830863c9d7 [^]

Fix ISSUE-47967: Avoid System.out.println and printStackTrace (use log4j)

- Avoid using System.out.println in code-example on how to implement below
hooks. Done to avoid having 'bad examples' for people to accidentally
copy.
  - For CashupHook and CashupReportHook also fixup code example to match
    the interface to be implemented)
- Cashup & CustomerStatistics, stop using printStackTrace and use proper
  log4j instead.

---
M src/org/openbravo/retail/posterminal/CashupHook.java
M src/org/openbravo/retail/posterminal/CustomerAddrCreationHook.java
M src/org/openbravo/retail/posterminal/CustomerLoaderHook.java
M src/org/openbravo/retail/posterminal/OrderLoaderHook.java
M src/org/openbravo/retail/posterminal/VoidLayawayHook.java
M src/org/openbravo/retail/posterminal/ad_reports/CashupReportHook.java
M src/org/openbravo/retail/posterminal/master/Cashup.java
M src/org/openbravo/retail/posterminal/process/CustomerStatistics.java
---
(0132821)
hgbot   
2021-11-04 08:14   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/617 [^]