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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0045245
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POS Hardware Managerminorhave not tried2020-10-19 12:372020-10-22 17:32
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

0045245: hwmanager deprecation warnings when compiling with java11: finalize() in Object 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/javapos/DeviceDisplayJavaPOS.java:107: warning: [deprecation] finalize() in Object has been deprecated
    [javac] public void finalize() throws Throwable {
    [javac] ^
    [javac] org.openbravo.retail.poshwmanager.sources/project/src/com/openbravo/pos/printer/javapos/DeviceDisplayJavaPOS.java:113: warning: [deprecation] finalize() in Object has been deprecated
    [javac] super.finalize();
    [javac] ^
    [javac] org.openbravo.retail.poshwmanager.sources/project/src/com/openbravo/pos/printer/javapos/DevicePrinterJavaPOS.java:378: warning: [deprecation] finalize() in Object has been deprecated
    [javac] public void finalize() throws Throwable {
    [javac] ^
    [javac] org.openbravo.retail.poshwmanager.sources/project/src/com/openbravo/pos/printer/javapos/DevicePrinterJavaPOS.java:394: warning: [deprecation] finalize() in Object has been deprecated
    [javac] super.finalize();
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"
TagsNo tags attached.
Attached Files

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

-  Notes
(0123828)
hgbot (developer)
2020-10-21 18:48

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources/-/merge_requests/12 [^]
(0123882)
hgbot (developer)
2020-10-22 17:10

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources [^]
Changeset: 6b4ad3b758a5b22b91c592411bbf48b8dd7fb799
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-10-22T15:35:02+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager.sources/-/commit/6b4ad3b758a5b22b91c592411bbf48b8dd7fb799 [^]

Fixes ISSUE-45245: Deprecation warnings with Java 11 because of finalize method

Object.finalize() method has been deprecated since Java 9 and as such it
generates a warning when being used.
It was used in DevicePrinterJavaPOS and DeviceDisplayJavaPOS to release
several reserved resources when the Objects ceased to exist.

The alternative implemented here adds a new default close() method to the
interfaces DeviceDisplay, DevicePrinter and DeviceFiscalPrinter that
allows to close and release all those resources on a Runtime jvm
ShutDownHook. Effectively doing what the finalize method was doing previously
but more centralized.

---
M project/src/com/openbravo/pos/fiscal/DeviceFiscalActiveXEltrade.java
M project/src/com/openbravo/pos/printer/DeviceDisplay.java
M project/src/com/openbravo/pos/printer/DeviceFiscalPrinter.java
M project/src/com/openbravo/pos/printer/DevicePrinter.java
M project/src/com/openbravo/pos/printer/DeviceTicket.java
M project/src/com/openbravo/pos/printer/javapos/DeviceDisplayJavaPOS.java
M project/src/com/openbravo/pos/printer/javapos/DevicePrinterJavaPOS.java
M project/src/com/openbravo/poshw/Main.java
M project/src/com/openbravo/poshw/MainApp.java
---
(0123883)
hgbot (developer)
2020-10-22 17:10

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

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager/-/merge_requests/13 [^]
(0123887)
hgbot (developer)
2020-10-22 17:32

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager [^]
Changeset: c22f2e2802d5166e45abc404c907899976ee9887
Author: Cristian Berner <cristian.berner@openbravo.com>
Date: 2020-10-22T17:29:33+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.poshwmanager/-/commit/c22f2e2802d5166e45abc404c907899976ee9887 [^]

Related to ISSUE-45245: Deprecation warnings with Java 11 because of finalize method

Object.finalize() method has been deprecated since Java 9 and as such it
generates a warning when being used.
It was used in DevicePrinterJavaPOS and DeviceDisplayJavaPOS to release
several reserved resources when the Objects ceased to exist.

The alternative implemented here adds a new default close() method to the
interfaces DeviceDisplay, DevicePrinter and DeviceFiscalPrinter that
allows to close and release all those resources on a Runtime jvm
ShutDownHook. Effectively doing what the finalize method was doing previously
but more centralized.

---
M bin/poshw.jar
M bin/rev.id
---
(0123888)
hgbot (developer)
2020-10-22 17:32

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

- Issue History
Date Modified Username Field Change
2020-10-19 12:37 shuehner New Issue
2020-10-19 12:37 shuehner Assigned To => Retail
2020-10-19 12:37 shuehner Triggers an Emergency Pack => No
2020-10-19 12:37 shuehner Issue generated from 0045244
2020-10-19 12:37 shuehner Relationship added blocks 0038337
2020-10-19 14:45 shuehner Resolution time => 1606777200
2020-10-19 14:45 shuehner Proposed Solution updated
2020-10-21 18:47 cberner Assigned To Retail => cberner
2020-10-21 18:48 hgbot Note Added: 0123828
2020-10-22 17:10 hgbot Resolution open => fixed
2020-10-22 17:10 hgbot Status new => closed
2020-10-22 17:10 hgbot Fixed in Version => RR21Q1
2020-10-22 17:10 hgbot Note Added: 0123882
2020-10-22 17:10 hgbot Note Added: 0123883
2020-10-22 17:13 hgbot Note Added: 0123884
2020-10-22 17:32 hgbot Note Added: 0123887
2020-10-22 17:32 hgbot Note Added: 0123888


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker