Notes |
|
|
Attached patch fixes up nearly add functional cases in modules/ folder + 1 in core (by just deleting dead code).
Note: In some cases also log4j.debug to log exception was changed to log4j.error also as that seems more correct. |
|
|
|
The following files also use printStackTrace:
./org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java: e.printStackTrace(System.err);
./org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java: e.printStackTrace(System.err);
./org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionModify.java: e.printStackTrace(System.err);
./org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_BankStatementProcess.java: e.printStackTrace(System.err);
./org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ReconciliationProcess.java: e.printStackTrace(System.err);
./org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java: e.printStackTrace(System.err);
When fixing please check if that printStacktrace is needed at all as OBException tyically are logged already or log themselves. So maybe the call is duplicate info anyway to be removed instead of just fixed. |
|
|
|
This issue does not fix up all code in pi/src/ folder but 2 cases if possible should be also fixed.
./src/org/openbravo/common/hooks/InventoryStatusValidationHook.java:// System.out.println("somebody is calling me");
./src/org/openbravo/common/hooks/OrderLineQtyChangedHook.java:// System.out.println("somebody is calling me");
Those are especially bad examples as they are code-examples for implementers of the hook. And we should not show bad code we don't in examples at least. |
|
|
(0097950)
|
hgbot
|
2017-07-07 14:03
|
|
Repository: erp/devel/pi
Changeset: b8a0e333c8f24865ff1360fc6488bc4773ee649e
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Jul 07 09:11:46 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b8a0e333c8f24865ff1360fc6488bc4773ee649e [^]
Fixed issue 36430: Cleanup bad logging (printStackTrace, System.*.print.*)
Pushed on Stefan's behalf
Removed usage of printStackTrace and System.*.print.* and tranform them to log4j.error
---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/Transactions.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.java
M src/org/openbravo/erpCommon/businessUtility/Tax.java
---
|
|
|
(0097952)
|
hgbot
|
2017-07-07 14:03
|
|
Repository: erp/devel/pi
Changeset: 918cd718f0f314445614dd83207faa272d58ef94
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Jul 07 09:36:56 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/918cd718f0f314445614dd83207faa272d58ef94 [^]
Fixed issue 36430: Cleanup bad logging (printStackTrace, System.*.print.*)
Replaced to log.error() calls where necessary
---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_BankStatementProcess.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ReconciliationProcess.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionModify.java
---
|
|
|
(0097953)
|
hgbot
|
2017-07-07 14:03
|
|
Repository: erp/devel/pi
Changeset: 47aab9353bb688761b0ee35a27bc8e31a0e10d4b
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Jul 07 09:39:49 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/47aab9353bb688761b0ee35a27bc8e31a0e10d4b [^]
Fixed issue 36430: removed bad usage even in examples
---
M src/org/openbravo/common/hooks/InventoryStatusValidationHook.java
M src/org/openbravo/common/hooks/OrderLineQtyChangedHook.java
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|