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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0047962
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2021-11-03 13:122021-11-11 07:04
ReportershuehnerView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in VersionPR22Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0047962: OBSchedulerInitializerListener should not use System.out.println for logging

DescriptionThis file is using a single System.out.println instead of proper log4j usage.

https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/base/OBSchedulerInitializerListener.java#L157 [^]

That was added initially in this commit:
https://gitlab.com/openbravo/product/openbravo/-/commit/893bc475e92232ed0e71aee050848dab458d62e8#320d411275551c3035b76c3ab909e6c86a0b53e7_116_139 [^]

In which the connection could have been null.

However current code is getting the connection from the DAL session so that whole "if (connection != null)" maybe obsolete
Steps To Reproducehttps://gitlab.com/openbravo/product/openbravo/-/commit/893bc475e92232ed0e71aee050848dab458d62e8#320d411275551c3035b76c3ab909e6c86a0b53e7_116_139 [^]
Proposed SolutionEither
a.) Remove the if/else block having the System.out.println in connection cannot be null
b.) if that is not possible change it to proper log4j error usage
TagsNo tags attached.
Attached Files

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

-  Notes
(0132844)
hgbot (developer)
2021-11-04 12:59

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/450 [^]
(0132949)
hgbot (developer)
2021-11-11 07:04

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 2167bee67004c45fa630ee97917935af5d187f67
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-11-11T06:02:26+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/2167bee67004c45fa630ee97917935af5d187f67 [^]

related to ISSUE-47962: OBSchedulerInitializerListener clean up

Includes:
 * Applies Java formatting
 * Removes useless logs
 * Uses parameterized logs instead of String concatenation

---
M src/org/openbravo/base/OBSchedulerInitializerListener.java
---
(0132950)
hgbot (developer)
2021-11-11 07:04

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/450 [^]
(0132951)
hgbot (developer)
2021-11-11 07:04

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b7993042d97e117cff2f9eacda63f1e88f023fa5
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-11-11T06:02:26+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b7993042d97e117cff2f9eacda63f1e88f023fa5 [^]

fixed ISSUE-47962: OBSchedulerInitializerListener logs directly to stdout

This was log done in specific case of trying to get a connection being
it null. There is no need to handle this specific case which, in case it
can even occur, would be handled by the enclosing try/catch block.

---
M src/org/openbravo/base/OBSchedulerInitializerListener.java
---

- Issue History
Date Modified Username Field Change
2021-11-03 13:12 shuehner New Issue
2021-11-03 13:12 shuehner Assigned To => platform
2021-11-03 13:12 shuehner Modules => Core
2021-11-03 13:12 shuehner Triggers an Emergency Pack => No
2021-11-03 13:12 shuehner Relationship added blocks 0036162
2021-11-03 13:17 shuehner Issue cloned 0047963
2021-11-04 12:59 hgbot Note Added: 0132844
2021-11-11 07:04 hgbot Note Added: 0132949
2021-11-11 07:04 hgbot Resolution open => fixed
2021-11-11 07:04 hgbot Status new => closed
2021-11-11 07:04 hgbot Note Added: 0132950
2021-11-11 07:04 hgbot Fixed in Version => PR22Q1
2021-11-11 07:04 hgbot Note Added: 0132951
2021-11-11 07:04 alostale Assigned To platform => alostale


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker