-
Notifications
You must be signed in to change notification settings - Fork 913
cleanup: remove deprecated TheadGroup methods #9096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Unsure.. Why the system created a new pull request over this.. Background can be found in #9091 |
|
Thank you for the update. I still think this is a behavioral difference. I notice, that there is already synchronization in place in the |
0cf9d33 to
cbe97ae
Compare
Hey Matthias, I think that I understand what you're saying. And I mostly agree. Yes, you are correct. This is probably a behavioral difference. My opinion would be that other behavior impacted should account for this as that would be proper s/w design. Having said that, the use of the clone() method is general disfavored. So what I changed it to do is make a shallow copy of the Set and iterate on that. Same behavior as before, yet removes the SuppressedWarnings message and cleans up the code some. |
matthiasblaesing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure whether I agree, that clone should be replaced with the copy constructor, but I assume, that it will perform similarly.
The copy constructor call though also needs to be protected by a synchronized block, as it will read the source set. (the same would be true if the clone would stay, the current situation is broken).
platform/core.execution/src/org/netbeans/core/execution/ExecutionEngine.java
Outdated
Show resolved
Hide resolved
platform/core.execution/src/org/netbeans/core/execution/ExecutionEngine.java
Outdated
Show resolved
Hide resolved
because you pushed the branch into the netbeans repo instead of your clone? |
desc: The ThreadGroup class is an artificate of by-gone days. The ability to destroy a thread group and the concept of a destroyed thread group no longer exists. Several of the methods are null functions as well as marked for removal. This cleans up the usage of these methods.
cbe97ae to
a1d4bac
Compare
matthiasblaesing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane to me. Thank you.
desc: The ThreadGroup class is an artifact of by-gone days. The ability to destroy a thread group and the concept of a destroyed thread group no longer exists. Several of the methods are null functions as well as marked for removal. This cleans up the usage of these methods.
^Add meaningful description above
Click to collapse/expand PR instructions
By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
Please make sure (eg.
git log) that all commits have a valid name and email address for you in the Author field.If you're a first time contributor, see the Contributing guidelines for more information.
If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.
PR approval and merge checklist:
If this PR targets the delivery branch: don't merge. (full wiki article)