Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0049435 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
design defect | [Openbravo ERP] A. Platform | minor | have not tried | 2022-05-30 08:37 | 2022-10-04 08:19 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | PR23Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0049435: don't use java.lang.ThreadGroup | |||||||
Description | In JDK19's JEP 425: Virtual Threads (Preview), there is a section for ThreadGroup where they comment: " java.lang.ThreadGroup is a legacy API for grouping threads that is rarely used in modern applications and unsuitable for grouping virtual threads. We deprecate and degrade it now, and expect to introduce a new thread-organizing construct in the future as part of structured concurrency. " We should prevent using it. --- [1] https://openjdk.java.net/jeps/425#java-lang-ThreadGroup [^] | |||||||
Steps To Reproduce | It is currently used in ImportEntryManager and ClusterServiceManager. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0139728) shuehner (administrator) 2022-07-29 13:28 |
Adding SLA date after checking ALO/SHU |
(0141533) hgbot (developer) 2022-09-30 08:23 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/720 [^] |
(0141620) hgbot (developer) 2022-10-04 08:19 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/720 [^] |
(0141621) hgbot (developer) 2022-10-04 08:19 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: 83995fe261a9eaeeae0e83108785e94803d48c85 Author: Asier Lostalé <asier.lostale@openbravo.com> Date: 04-10-2022 06:19:26 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/83995fe261a9eaeeae0e83108785e94803d48c85 [^] fixes ISSUE-49435: prevents using legacy ThreadGroup The only direct use in the code was to assign the newly created thread to the group, which was obtainged from the current thread that was creaing the new thread. The Thread super constructor we are using Thread(ThreadGroup, Runnable, String name, long) documents [1] that if the group is null and there is no security manager, the group is set to the current thread's thread group. Which is, in practice, the same that was done before. Also the stackSize parameter was always 0 which indicates to be ignored. Taking into account all this, it is possible to use the simpler constructor Thread(Runnable target, String name). --- [1] https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Thread.html#%3Cinit%3E(java.lang.ThreadGroup,java.lang.Runnable,java.lang.String,long) [^] --- M src/org/openbravo/cluster/ClusterServiceManager.java M src/org/openbravo/service/importprocess/ImportEntryManager.java --- |
Issue History | |||
Date Modified | Username | Field | Change |
2022-05-30 08:37 | alostale | New Issue | |
2022-05-30 08:37 | alostale | Assigned To | => Triage Platform Base |
2022-05-30 08:37 | alostale | Modules | => Core |
2022-05-30 08:37 | alostale | Triggers an Emergency Pack | => No |
2022-05-30 08:37 | alostale | Type | defect => design defect |
2022-05-30 08:37 | alostale | Relationship added | blocks 0049432 |
2022-07-29 13:28 | shuehner | Note Added: 0139728 | |
2022-07-29 13:28 | shuehner | Target Version | => PR22Q4 |
2022-09-29 14:16 | alostale | Assigned To | Triage Platform Base => caristu |
2022-09-29 17:37 | shuehner | Target Version | PR22Q4 => |
2022-09-29 17:37 | shuehner | Issue Monitored: shuehner | |
2022-09-30 08:23 | hgbot | Note Added: 0141533 | |
2022-09-30 10:34 | caristu | Assigned To | caristu => alostale |
2022-10-04 08:19 | hgbot | Note Added: 0141620 | |
2022-10-04 08:19 | hgbot | Resolution | open => fixed |
2022-10-04 08:19 | hgbot | Status | new => closed |
2022-10-04 08:19 | hgbot | Fixed in Version | => PR23Q1 |
2022-10-04 08:19 | hgbot | Note Added: 0141621 |
Copyright © 2000 - 2009 MantisBT Group |