aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2014-01-03 04:59:53 (EST)
committerGerrit Code Review @ Eclipse.org2014-01-03 12:20:40 (EST)
commit34cf1bdbcef86349b12798d93b90bfae77c8a52f (patch)
treed84e1ec92920181660171e08b8c09d85cb593070
parent72a2dd63bdac100bd99c0df62690bd2dfb915634 (diff)
downloadeclipse.jdt.debug-34cf1bdbcef86349b12798d93b90bfae77c8a52f.zip
eclipse.jdt.debug-34cf1bdbcef86349b12798d93b90bfae77c8a52f.tar.gz
eclipse.jdt.debug-34cf1bdbcef86349b12798d93b90bfae77c8a52f.tar.bz2
NPE during retrieving Launching Plugin preferences while Java Tooling Initialization Description : https://bugs.eclipse.org/bugs/show_bug.cgi?id=238681 The defect is not reproduced but a probable cause may be the manual creation of LaunchingPlugin. Removed the manual creation. Change-Id: I74c49bf0657eccbedf48579f52087889230c2ec1 Signed-off-by: Sarika Sinha <sarika.sinha@in.ibm.com>
-rw-r--r--org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java
index 7f28536..ac57d1e 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/LaunchingPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -468,9 +468,6 @@ public class LaunchingPlugin extends Plugin implements DebugOptionsListener, IEc
* @return the singleton instance of <code>LaunchingPlugin</code>
*/
public static LaunchingPlugin getDefault() {
- if(fgLaunchingPlugin == null) {
- fgLaunchingPlugin = new LaunchingPlugin();
- }
return fgLaunchingPlugin;
}
@@ -1240,7 +1237,9 @@ public class LaunchingPlugin extends Plugin implements DebugOptionsListener, IEc
private static String getExternalForm(URL url) {
String externalForm = url.toExternalForm();
if (externalForm == null)
+ {
return ""; //$NON-NLS-1$
+ }
externalForm = externalForm.trim();
if (externalForm.endsWith("/")) { //$NON-NLS-1$
// Remove the trailing slash