Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0045245 | Retail Modules | Web POS Hardware Manager | public | 2020-10-19 12:37 | 2020-10-22 17:32 |
|
Reporter | shuehner | |
Assigned To | cberner | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | RR21Q1 | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0045245: hwmanager deprecation warnings when compiling with java11: finalize() in Object has been deprecated |
Description | 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/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 Reproduce | compile hardware manager with Java11
To get detailed warning output on commandline the following can be used
ant clean compile -Djavac.compilerargs="-Xlint:deprecation" |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | blocks | defect | 0038337 | | closed | gorka_gil | make hardware manager compatible with java 9 - 11 |
|
Attached Files | |
|
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 | |
Notes |
|
(0123828)
|
hgbot
|
2020-10-21 18:48
|
|
|
|
(0123882)
|
hgbot
|
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
|
2020-10-22 17:10
|
|
|
|
(0123884)
|
hgbot
|
2020-10-22 17:13
|
|
|
|
(0123887)
|
hgbot
|
2020-10-22 17:32
|
|
|
|
(0123888)
|
hgbot
|
2020-10-22 17:32
|
|
|