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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0047013
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2021-06-08 08:552021-06-15 18:27
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in VersionPR21Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0047013: JDK17 deprecation for removal warnings

DescriptionCompiling Openbravo with JDK17 (currently ea25) a few deprecation for removal warnings appear.
Steps To Reproduce* Compile Using JDK17 (ea25)
  In src-core:

    [javac] /home/alostale/ws/projects/stack/openbravo/src-core/src/org/openbravo/base/ConfigParameters.java:164: warning: [removal] AccessControlException in java.security has been deprecated and marked for removal
    [javac] } catch (java.security.AccessControlException err) {
    [javac] ^
    [javac] 1 warning

  In openbravo core:
    [javac] /home/alostale/ws/projects/stack/openbravo/src/org/openbravo/cluster/ClusterServiceManager.java:110: warning: [removal] SecurityManager in java.lang has been deprecated and marked for removal
    [javac] SecurityManager s = System.getSecurityManager();
    [javac] ^
    [javac] /home/alostale/ws/projects/stack/openbravo/src/org/openbravo/cluster/ClusterServiceManager.java:110: warning: [removal] getSecurityManager() in System has been deprecated and marked for removal
    [javac] SecurityManager s = System.getSecurityManager();
    [javac] ^
    [javac] /home/alostale/ws/projects/stack/openbravo/src/org/openbravo/service/importprocess/ImportEntryManager.java:751: warning: [removal] SecurityManager in java.lang has been deprecated and marked for removal
    [javac] SecurityManager s = System.getSecurityManager();
    [javac] ^
    [javac] /home/alostale/ws/projects/stack/openbravo/src/org/openbravo/service/importprocess/ImportEntryManager.java:751: warning: [removal] getSecurityManager() in System has been deprecated and marked for removal
    [javac] SecurityManager s = System.getSecurityManager();

TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0045903 newTriage Platform Base Support JDK17 (LTS) 

-  Notes
(0129187)
shuehner (administrator)
2021-06-08 14:30

For the ConfigParameters part:

https://gitlab.com/openbravo/product/openbravo/-/blob/master/src/org/openbravo/base/secureApp/VariablesSecureApp.java#L71 [^]

In that other file we read the same 2 properties already without the extra protection. So should be fine to just drop the extra try/catch without any loss of functionality in practice.
(0129223)
hgbot (developer)
2021-06-09 09:07

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/382 [^]
(0129526)
hgbot (developer)
2021-06-15 18:27

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/382 [^]
(0129527)
hgbot (developer)
2021-06-15 18:27

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: f5333ef320e9429cc986805b3c68b847a216f417
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-06-15T16:24:32+00:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/f5333ef320e9429cc986805b3c68b847a216f417 [^]

fixed ISSUE-47013: JDK17+ depreaction for removal warnings

JEP 411 [1] Deprecate the Security Manager for Removal, affects a few
cases which are now fixed:

  * ImportEntryManager and ClusterServiceManager used
    SecurityManager.getThreadGroup() method in case there was a
    SecurityManager other ways it took current thread's. In most of the
    cases security manager wasn't configured so current thred's was
    taken anyway in addition, default SecurityManager's implementation
    also returns current thread's group. It has changed now to always
    take current thread's without additional checks.

  * ConfigParameters catched the, now deprecated, java.security.AccessControlException
    which can be thrown by System.getPropery if SecurityManager is
    configured to prevent this property to be got. In other places we
    are not performing this check, so it is safe to be removed also from
    here.

---
[1] https://openjdk.java.net/jeps/411 [^]

---
M src-core/src/org/openbravo/base/ConfigParameters.java
M src/org/openbravo/cluster/ClusterServiceManager.java
M src/org/openbravo/service/importprocess/ImportEntryManager.java
---

- Issue History
Date Modified Username Field Change
2021-06-08 08:55 alostale New Issue
2021-06-08 08:55 alostale Assigned To => platform
2021-06-08 08:55 alostale Modules => Core
2021-06-08 08:55 alostale Triggers an Emergency Pack => No
2021-06-08 08:56 alostale Relationship added related to 0045903
2021-06-08 08:56 alostale Status new => acknowledged
2021-06-08 14:30 shuehner Note Added: 0129187
2021-06-09 08:48 alostale Status acknowledged => scheduled
2021-06-09 08:48 alostale Assigned To platform => alostale
2021-06-09 09:07 hgbot Note Added: 0129223
2021-06-15 18:27 hgbot Note Added: 0129526
2021-06-15 18:27 hgbot Resolution open => fixed
2021-06-15 18:27 hgbot Status scheduled => closed
2021-06-15 18:27 hgbot Fixed in Version => PR21Q3
2021-06-15 18:27 hgbot Note Added: 0129527


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker