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 <Lars.Vogel@vogella.com>
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 35154f8..d3d81e0 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 @@
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