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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045244
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POS Hardware Managerminorhave not tried2020-10-19 12:352020-10-22 17:24
ReportershuehnerView Statuspublic 
Assigned Tocberner 
PrioritynormalResolutionfixedFixed in VersionRR21Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0045244: hwmanager deprecation warnings when compiling with java11: newInstance() in Class has been deprecated

DescriptionHardware 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());
Steps To Reproducecompile hardware manager with Java11
To get detailed warning output on commandline the following can be used
ant clean compile -Djavac.compilerargs="-Xlint:deprecation"
Proposed Solution38115 has example on how this can be fixed
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0038337 closedgorka_gil make hardware manager compatible with java 9 - 11 

-  Notes
(0123827)
hgbot (developer)
2020-10-21 17:22

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources/-/merge_requests/11 [^]
(0123842)
hgbot (developer)
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 (developer)
2020-10-22 09:31

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources/-/merge_requests/11 [^]
(0123881)
hgbot (developer)
2020-10-22 17:08

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager/-/merge_requests/12 [^]
(0123885)
hgbot (developer)
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 (developer)
2020-10-22 17:24

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager/-/merge_requests/12 [^]

- Issue History
Date Modified Username Field Change
2020-10-19 12:35 shuehner New Issue
2020-10-19 12:35 shuehner Assigned To => Retail
2020-10-19 12:35 shuehner Triggers an Emergency Pack => No
2020-10-19 12:35 shuehner Relationship added blocks 0038130
2020-10-19 12:37 shuehner Issue cloned 0045245
2020-10-19 12:37 shuehner Relationship deleted blocks 0038130
2020-10-19 12:37 shuehner Relationship added blocks 0038337
2020-10-19 14:45 shuehner Resolution time => 1606777200
2020-10-21 17:16 cberner Assigned To Retail => cberner
2020-10-21 17:22 hgbot Note Added: 0123827
2020-10-22 09:31 hgbot Resolution open => fixed
2020-10-22 09:31 hgbot Status new => closed
2020-10-22 09:31 hgbot Fixed in Version => RR21Q1
2020-10-22 09:31 hgbot Note Added: 0123842
2020-10-22 09:31 hgbot Note Added: 0123843
2020-10-22 17:08 hgbot Note Added: 0123881
2020-10-22 17:24 hgbot Note Added: 0123885
2020-10-22 17:24 hgbot Note Added: 0123886


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker