Skip to content

I20210928-0600

@vogella vogella tagged this 27 Sep 11:00
A boxed primitive is created from a String, just to extract the unboxed
primitive value.It is more efficient to just call the static parseXXX
method.


Before:
int number = Integer.valueOf("42", 8);
new Double("42.42").doubleValue();

After:

int number = Integer.parseInt("42", 8);
Double.parseDouble("42.42");

Change-Id: Ie913f1bb82296af76ca20ed9b1994b5422647a31
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/178410
Tested-by: Platform Bot <platform-bot@eclipse.org>
Assets 2
Loading