Openbravo Issue Tracking System - Modules
View Issue Details
0045282ModulesIDL For Variantspublic2020-10-22 14:202020-10-23 07:00
cberner 
cberner 
normalminorhave not tried
closedfixed 
5
 
 
0045282: idl.variants ImportProduct makes use of deprecated Brand entity
ImportProduct class makes use of deprecated Brand entity and a java compiler warning is thrown because of this.
Although ImportProduct has a @SuppressWarnings("deprecation") annotation at the level class, it is not enough because Brand class is imported directly. (Note, this only fails in Java 8, because Java9 fixes this import deprecated detection)
In description.
Use Brand class explicitly, without importing it at the top level of the class. In the future, remove usage of deprecated Brand class.
No tags attached.
caused by defect 0045029 closed cberner Openbravo ERP Generate deprecated tags for deprecated properties by default 
Issue History
2020-10-22 14:20cbernerNew Issue
2020-10-22 14:20cbernerAssigned To => cberner
2020-10-22 14:24cbernerRelationship addedcaused by 0045029
2020-10-22 14:30hgbotNote Added: 0123873
2020-10-23 07:00hgbotResolutionopen => fixed
2020-10-23 07:00hgbotStatusnew => closed
2020-10-23 07:00hgbotNote Added: 0123894
2020-10-23 07:00hgbotNote Added: 0123895

Notes
(0123873)
hgbot   
2020-10-22 14:30   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.idl.variants/-/merge_requests/2 [^]
(0123894)
hgbot   
2020-10-23 07:00   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.idl.variants [^]
Changeset: a059c3c058b004df867a25a6ffdf23ccce959adb
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-10-22T14:29:36+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.idl.variants/-/commit/a059c3c058b004df867a25a6ffdf23ccce959adb [^]

Fixes ISSUE-45282: ImportProduct makes use of deprecated Brand entity

@SuppressWarnings("deprecation") annotation being used at class level in
ImportProduct is not enough to suppress the warnings of Brand entity
usage, because Java 8 compiler fails if it is imported explicitly.

To fix this, the supress warnings annotation has been moved to the
method that makes use of the deprecated entity, and all usages of Brand
now explicitly use the class+package without importing it at the top of
ImportProduct class.

---
M src/org/openbravo/idl/variants/ImportProduct.java
---
(0123895)
hgbot   
2020-10-23 07:00   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.idl.variants/-/merge_requests/2 [^]