diff options
| author | Christian Georgi | 2013-03-16 11:53:18 +0000 |
|---|---|---|
| committer | Thomas Watson | 2013-04-02 14:56:22 +0000 |
| commit | 7a0f9d3e9ef6a51205db95a3b8af192c86dc12be (patch) | |
| tree | b6f9a767469111df1ded4f00a97207452d0e5459 | |
| parent | 7cbc26f36dbb6afb6747e81579ac6f9d7c3ce522 (diff) | |
| download | rt.equinox.framework-7a0f9d3e9ef6a51205db95a3b8af192c86dc12be.tar.gz rt.equinox.framework-7a0f9d3e9ef6a51205db95a3b8af192c86dc12be.tar.xz rt.equinox.framework-7a0f9d3e9ef6a51205db95a3b8af192c86dc12be.zip | |
Bug 404233 - NPE when clearing trace file
| -rw-r--r-- | bundles/org.eclipse.osgi/supplement/src/org/eclipse/osgi/framework/debug/FrameworkDebugOptions.java | 9 |
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 7c245f649..2086285aa 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 +} |
