Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045244Retail ModulesWeb POS Hardware Managerpublic2020-10-19 12:352020-10-22 17:24
shuehner 
cberner 
normalminorhave not tried
closedfixed 
5
 
RR21Q1 
No
0045244: hwmanager deprecation warnings when compiling with java11: newInstance() in Class has been deprecated
Hardware manager still has some deprecation warnings left unfixed when compiling with Java>8

    [javac] org.openbravo.retail.poshwmanager.sources/project/src/com/openbravo/pos/printer/escpos/USBDeviceList.java:151: warning: [deprecation] newInstance() in Class has been deprecated
    [javac] .newInstance());
    [javac] ^
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Class
    [javac] org.openbravo.retail.poshwmanager.sources/project/src/com/openbravo/pos/printer/escpos/USBDeviceList.java:158: warning: [deprecation] newInstance() in Class has been deprecated
    [javac] .newInstance());
    [javac] ^
    [javac] where T is a type-variable:
    [javac] T extends Object declared in class Class
    [javac] org.openbravo.retail.poshwmanager.sources/project/src/com/openbravo/pos/printer/escpos/USBDeviceList.java:165: warning: [deprecation] newInstance() in Class has been deprecated
    [javac] .newInstance());
compile hardware manager with Java11
To get detailed warning output on commandline the following can be used
ant clean compile -Djavac.compilerargs="-Xlint:deprecation"
38115 has example on how this can be fixed
No tags attached.
blocks defect 0038337 closed gorka_gil make hardware manager compatible with java 9 - 11 
Issue History
2020-10-19 12:35shuehnerNew Issue
2020-10-19 12:35shuehnerAssigned To => Retail
2020-10-19 12:35shuehnerTriggers an Emergency Pack => No
2020-10-19 12:35shuehnerRelationship addedblocks 0038130
2020-10-19 12:37shuehnerIssue cloned0045245
2020-10-19 12:37shuehnerRelationship deletedblocks 0038130
2020-10-19 12:37shuehnerRelationship addedblocks 0038337
2020-10-19 14:45shuehnerResolution time => 1606777200
2020-10-21 17:16cbernerAssigned ToRetail => cberner
2020-10-21 17:22hgbotNote Added: 0123827
2020-10-22 09:31hgbotResolutionopen => fixed
2020-10-22 09:31hgbotStatusnew => closed
2020-10-22 09:31hgbotFixed in Version => RR21Q1
2020-10-22 09:31hgbotNote Added: 0123842
2020-10-22 09:31hgbotNote Added: 0123843
2020-10-22 17:08hgbotNote Added: 0123881
2020-10-22 17:24hgbotNote Added: 0123885
2020-10-22 17:24hgbotNote Added: 0123886

Notes
(0123827)
hgbot   
2020-10-21 17:22   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources/-/merge_requests/11 [^]
(0123842)
hgbot   
2020-10-22 09:31   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources [^]
Changeset: 2b8f8e80e051ce8982019e0e6c7bf1305f42897f
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-10-22T07:31:16+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources/-/commit/2b8f8e80e051ce8982019e0e6c7bf1305f42897f [^]

Fixed ISSUE-45244: Deprecation warning newInstance() when compiling with Java11

Class#newInstance() method was deprecated in Java 9 and as such it
should not be used.
Instead use Class#getDeclaredConstructor().newInstance() and catch the
newly thrown exceptions.

---
M project/src/com/openbravo/pos/printer/escpos/USBDeviceList.java
---
(0123843)
hgbot   
2020-10-22 09:31   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources/-/merge_requests/11 [^]
(0123881)
hgbot   
2020-10-22 17:08   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager/-/merge_requests/12 [^]
(0123885)
hgbot   
2020-10-22 17:24   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager [^]
Changeset: a429fe8a3a8f651f3b917d4cbaf2e2d234114bd0
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-10-22T17:06:06+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager/-/commit/a429fe8a3a8f651f3b917d4cbaf2e2d234114bd0 [^]

Related to ISSUE-45244: Deprecation warning newInstance when compiling with Java11

Class#newInstance() method was deprecated in Java 9 and as such it
should not be used.
Instead use Class#getDeclaredConstructor().newInstance() and catch the
newly thrown exceptions.

---
M bin/poshw.jar
M bin/rev.id
---
(0123886)
hgbot   
2020-10-22 17:24   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager/-/merge_requests/12 [^]