From c01c68a4768a6f24a671985e3cc1acaddc38a976 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Tue, 1 Oct 2019 11:30:17 +0200 Subject: Minor - Use Boolean.parseBoolean instead of Boolean.valueOf This is more efficient and fixes a Sonar warning Change-Id: Id6fe50b7e2162c823f2ff320121d7ebfd4b6d7ea Signed-off-by: Lars Vogel --- .../src/org/eclipse/core/runtime/adaptor/EclipseStarter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java index 35154f84d..d3d81e0ca 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java @@ -390,9 +390,10 @@ public class EclipseStarter { return Integer.valueOf(0); try { if (appLauncher == null) { - boolean launchDefault = Boolean.valueOf(getProperty(PROP_APPLICATION_LAUNCHDEFAULT, "true")).booleanValue(); //$NON-NLS-1$ + + boolean launchDefault = Boolean.parseBoolean(getProperty(PROP_APPLICATION_LAUNCHDEFAULT, "true")); //$NON-NLS-1$ // create the ApplicationLauncher and register it as a service - appLauncher = new EclipseAppLauncher(context, Boolean.valueOf(getProperty(PROP_ALLOW_APPRELAUNCH)).booleanValue(), launchDefault, log, equinoxConfig); + appLauncher = new EclipseAppLauncher(context, Boolean.parseBoolean(getProperty(PROP_ALLOW_APPRELAUNCH)), launchDefault, log, equinoxConfig); appLauncherRegistration = context.registerService(ApplicationLauncher.class.getName(), appLauncher, null); // must start the launcher AFTER service restration because this method // blocks and runs the application on the current thread. This method -- cgit v1.2.3