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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039640
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Advanced Warehouse Operationstrivialalways2018-11-16 08:532018-11-19 13:52
ReporterjarmendarizView Statuspublic 
Assigned Tojarmendariz 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision9dbd35ba3f15
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned Tovmromanos
Regression introduced in release
Summary

0039640: BeautifyLogHTMLFormatter shows a compiler warning when updating log4j to 2.x

DescriptionWhen pi's log4j version is updated to 2.x, BeautifyLogHTMLFormatter shows the following warning using the Eclipse compiler:

 1. WARNING in /srv/ci/workspace/try-ret-modules-pgsql-suite1/modules/org.openbravo.warehouse.advancedwarehouseoperations/src/org/openbravo/warehouse/advancedwarehouseoperations/verbosity/BeautifyLogHTMLFormatter.java (at line 41)
     log4j.error(e.getMessage(), e.getStackTrace());
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Type StackTraceElement[] of the last argument to method error(String, Object...) doesn't exactly match the vararg parameter type. Cast to Object[] to confirm the non-varargs invocation, or pass individual arguments of type Object for a varargs invocation.
Steps To Reproduce* Update pi to use log4j2 [1]
* Install AWO modules
* Compile with Eclipse compiler

[1] https://issues.openbravo.com/view.php?id=39504 [^]
Proposed SolutionReplace the log call from log4j.error(String, Object) to log4j.error(String, Throwable)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0039504 closedjarmendariz Openbravo ERP Upgrade Log4j to version 2 

-  Notes
(0107981)
hgbot (developer)
2018-11-19 12:42

Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 9dbd35ba3f153d82c4379dc9e50a82991f324274
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Fri Nov 16 09:08:55 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/9dbd35ba3f153d82c4379dc9e50a82991f324274 [^]

Fixed issue 39640: Fixed log call ambiguity when updating to log4j2.

Calling a log method with an Object array as a second parameter is
ambiguous as the compiler cannot tell if this should be a varargs call
or not. This code can be replaced with a method that accepts a Throwable
as a second parameter and prints its stacktrace.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/verbosity/BeautifyLogHTMLFormatter.java
---
(0107982)
vmromanos (manager)
2018-11-19 13:52

Code review OK

- Issue History
Date Modified Username Field Change
2018-11-16 08:53 jarmendariz New Issue
2018-11-16 08:53 jarmendariz Assigned To => Triage Finance
2018-11-16 08:53 jarmendariz Relationship added related to 0039504
2018-11-16 09:00 jarmendariz Assigned To Triage Finance => jarmendariz
2018-11-16 09:00 jarmendariz Status new => scheduled
2018-11-19 12:42 hgbot Checkin
2018-11-19 12:42 hgbot Note Added: 0107981
2018-11-19 12:42 hgbot Status scheduled => resolved
2018-11-19 12:42 hgbot Resolution open => fixed
2018-11-19 12:42 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/9dbd35ba3f153d82c4379dc9e50a82991f324274 [^]
2018-11-19 13:05 jarmendariz Review Assigned To => vmromanos
2018-11-19 13:52 vmromanos Note Added: 0107982
2018-11-19 13:52 vmromanos Status resolved => closed
2022-09-06 17:18 caristu Category Advance Warehouse Operations => Advanced Warehouse Operations


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker