Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0047967
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2021-11-03 14:212021-11-04 08:17
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in VersionRR22Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0047967: Several files in posterminal are using bad logging (printStrace or System.out.println)

Description
- 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
Steps To Reproducehttps://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/blob/master/src/org/openbravo/retail/discounts/AddPack.java#L113 [^]
Proposed Solutionmove it to log4j.debug (as just debugging output anyway)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks design defect 0036162 acknowledgedTriage Platform Base Openbravo ERP clean up openbravo.log 

-  Notes
(0132814)
hgbot (developer)
2021-11-03 14:25

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/617 [^]
(0132820)
hgbot (developer)
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 (developer)
2021-11-04 08:14

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/617 [^]

- Issue History
Date Modified Username Field Change
2021-11-03 14:21 shuehner New Issue
2021-11-03 14:21 shuehner Assigned To => Retail
2021-11-03 14:21 shuehner Triggers an Emergency Pack => No
2021-11-03 14:21 shuehner Issue generated from 0047964
2021-11-03 14:22 shuehner Relationship added blocks 0036162
2021-11-03 14:25 hgbot Note Added: 0132814
2021-11-04 08:14 hgbot Note Added: 0132820
2021-11-04 08:14 hgbot Note Added: 0132821
2021-11-04 08:16 marvintm Status new => scheduled
2021-11-04 08:16 marvintm Assigned To Retail => shuehner
2021-11-04 08:16 marvintm Status scheduled => resolved
2021-11-04 08:16 marvintm Fixed in Version => RR22Q1
2021-11-04 08:16 marvintm Resolution open => fixed
2021-11-04 08:17 marvintm Review Assigned To => marvintm
2021-11-04 08:17 marvintm Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker