Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 470568 - Replace new Boolean with Boolean.valueOf
Summary: Replace new Boolean with Boolean.valueOf
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.6 M1   Edit
Assignee: Alex Blewitt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 278441 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-06-19 05:19 EDT by Alex Blewitt CLA
Modified: 2019-02-14 15:44 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Blewitt CLA 2015-06-19 05:19:28 EDT
There are some examples where new Boolean() is used in Platform.SWT. The static accessor Boolean.valueOf was added in Java 1.4 to provide access to a flyweight object where a unique identity is not required, and which can in-line in the JIT (object construction only in-lines when it can be proven that the object doesn't escape).
Comment 1 Eclipse Genie CLA 2015-06-19 05:21:42 EDT
New Gerrit change created: https://git.eclipse.org/r/50496
Comment 3 Alexander Kurtakov CLA 2015-07-07 05:36:27 EDT
Pushed to master.
Comment 4 Eric Williams CLA 2019-02-14 15:44:02 EST
*** Bug 278441 has been marked as a duplicate of this bug. ***