Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039262Openbravo ERPA. Platformpublic2018-09-11 09:562020-10-30 07:54
shuehner 
alostale 
normaltrivialhave not tried
closedfixed 
5
 
PR21Q1 
Core
No
0039262: Deprecation warnings on cmdline with java10 compiling src-test
Running ant tasks to run junit tests (which will also compile them) with java10 shows still a deprecation warnings on commandline.

compile.test:
    [javac] Compiling 521 source files to /opt/OpenbravoERP/src-test/build/classes
    [javac] Note: /opt/OpenbravoERP/src-test/src/org/openbravo/test/base/HiddenObjectHelper.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

NOTE:
When fixing please to also test run with latest java11 release candidate (>= ea28)
run ant run.test -Dtest=org.openbravo.test.scheduling.ProcessSchedulingTest
with JAVA_HOME set to java 10


No tags attached.
related to feature request 0038130 closed caristu support JDK 11 
depends on feature request 0043719 closed platform increase minimum supported JDK to 11 
depends on feature request 0044064 closed cberner Raise minimum stack Java version to JDK11 
diff 39262.diff (1,800) 2020-04-13 11:20
https://issues.openbravo.com/file_download.php?file_id=14297&type=bug
Issue History
2018-09-11 09:56shuehnerNew Issue
2018-09-11 09:56shuehnerAssigned To => platform
2018-09-11 09:56shuehnerModules => Core
2018-09-11 09:56shuehnerTriggers an Emergency Pack => No
2020-04-13 11:16alostaleRelationship addedrelated to 0038130
2020-04-13 11:17alostaleRelationship addeddepends on 0043719
2020-04-13 11:20alostaleFile Added: 39262.diff
2020-04-13 11:23alostaleNote Added: 0119135
2020-04-13 11:23alostaleStatusnew => acknowledged
2020-04-13 11:23alostaleTypedefect => design defect
2020-10-28 13:47alostaleRelationship addeddepends on 0044064
2020-10-28 13:58hgbotNote Added: 0123976
2020-10-29 07:24alostaleAssigned Toplatform => alostale
2020-10-30 07:54hgbotResolutionopen => fixed
2020-10-30 07:54hgbotStatusacknowledged => closed
2020-10-30 07:54hgbotNote Added: 0124032
2020-10-30 07:54hgbotFixed in Version => PR21Q1
2020-10-30 07:54hgbotNote Added: 0124033

Notes
(0119135)
alostale   
2020-04-13 11:23   
Moving to design defect to be revisited when raising minimum supported JDK to 11 (0043719). Attached fix proposal.

Currently using Field.isAccessible method, which was deprecated in JDK 9 in favor of Field.canAccess which was introduced in JDK 9. As we continue supporting JDK 8, we cannot move to newer method, in eclipse this warning gets suppressed but there is no way to do so in CLI.
(0123976)
hgbot   
2020-10-28 13:58   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/205 [^]
(0124032)
hgbot   
2020-10-30 07:54   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/205 [^]
(0124033)
hgbot   
2020-10-30 07:54   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 25426aae9d26242908856ea1ee018a265f44075c
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2020-10-30T07:53:44+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/25426aae9d26242908856ea1ee018a265f44075c [^]

fixed ISSUE-39262: deprecation warnings on cli with jdk11 compiling src-test

Those warnings were caused by the usage of Field.isAccessible API which
was deprecated in JDK9. Now that minimum JDK has been raised to 11 by
FR-44064, it is possible to use Field.canAccess API, which was introduced
in JDK9, to replace the former.

---
M modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/ParameterCdiTestRule.java
M modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/DisplayLogicAtServerLevelTest.java
M src-test/src/org/openbravo/test/base/HiddenObjectHelper.java
---