Openbravo Issue Tracking System - Modules
View Issue Details
0039640ModulesAdvanced Warehouse Operationspublic2018-11-16 08:532018-11-19 13:52
jarmendariz 
jarmendariz 
normaltrivialalways
closedfixed 
5
 
 
vmromanos
0039640: BeautifyLogHTMLFormatter shows a compiler warning when updating log4j to 2.x
When 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.
* Update pi to use log4j2 [1]
* Install AWO modules
* Compile with Eclipse compiler

[1] https://issues.openbravo.com/view.php?id=39504 [^]
Replace the log call from log4j.error(String, Object) to log4j.error(String, Throwable)
No tags attached.
related to feature request 0039504 closed jarmendariz Openbravo ERP Upgrade Log4j to version 2 
Issue History
2018-11-16 08:53jarmendarizNew Issue
2018-11-16 08:53jarmendarizAssigned To => Triage Finance
2018-11-16 08:53jarmendarizRelationship addedrelated to 0039504
2018-11-16 09:00jarmendarizAssigned ToTriage Finance => jarmendariz
2018-11-16 09:00jarmendarizStatusnew => scheduled
2018-11-19 12:42hgbotCheckin
2018-11-19 12:42hgbotNote Added: 0107981
2018-11-19 12:42hgbotStatusscheduled => resolved
2018-11-19 12:42hgbotResolutionopen => fixed
2018-11-19 12:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/9dbd35ba3f153d82c4379dc9e50a82991f324274 [^]
2018-11-19 13:05jarmendarizReview Assigned To => vmromanos
2018-11-19 13:52vmromanosNote Added: 0107982
2018-11-19 13:52vmromanosStatusresolved => closed
2022-09-06 17:18caristuCategoryAdvance Warehouse Operations => Advanced Warehouse Operations

Notes
(0107981)
hgbot   
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   
2018-11-19 13:52   
Code review OK