summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Georgi2013-03-16 07:53:18 (EDT)
committer Thomas Watson2013-04-02 10:56:22 (EDT)
commit7a0f9d3e9ef6a51205db95a3b8af192c86dc12be (patch)
treeb6f9a767469111df1ded4f00a97207452d0e5459
parent7cbc26f36dbb6afb6747e81579ac6f9d7c3ce522 (diff)
downloadrt.equinox.framework-7a0f9d3e9ef6a51205db95a3b8af192c86dc12be.zip
rt.equinox.framework-7a0f9d3e9ef6a51205db95a3b8af192c86dc12be.tar.gz
rt.equinox.framework-7a0f9d3e9ef6a51205db95a3b8af192c86dc12be.tar.bz2
Bug 404233 - NPE when clearing trace file
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java
index 7c245f6..2086285 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 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
@@ -434,7 +434,10 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
public synchronized void setFile(final File traceFile) {
this.outFile = traceFile;
- FrameworkProperties.setProperty(PROP_TRACEFILE, this.outFile.getAbsolutePath());
+ if (this.outFile != null)
+ FrameworkProperties.setProperty(PROP_TRACEFILE, this.outFile.getAbsolutePath());
+ else
+ FrameworkProperties.clearProperty(PROP_TRACEFILE);
// the file changed so start a new session
EclipseDebugTrace.newSession = true;
}
@@ -505,4 +508,4 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom
public void removedService(ServiceReference<DebugOptionsListener> reference, DebugOptionsListener service) {
context.ungetService(reference);
}
-} \ No newline at end of file
+}