Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2007-04-04 19:56:18 +0000
committerDJ Houghton2007-04-04 19:56:18 +0000
commit5c1d5aeee93edd2db564e4f171727ee5dde34392 (patch)
treeb5e40f89d077e200253d5797254a2d97c899005e /bundles/org.eclipse.equinox.preferences
parentb44f19c52fcfe9661c6b83bcf8b3a1ca5e84d71a (diff)
downloadrt.equinox.bundles-5c1d5aeee93edd2db564e4f171727ee5dde34392.tar.gz
rt.equinox.bundles-5c1d5aeee93edd2db564e4f171727ee5dde34392.tar.xz
rt.equinox.bundles-5c1d5aeee93edd2db564e4f171727ee5dde34392.zip
Bug 179695 - [prefs] NPE when using Preferences API without a product
Diffstat (limited to 'bundles/org.eclipse.equinox.preferences')
-rw-r--r--bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
index 1ec791d93..66a8bee87 100644
--- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
+++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
+ * Copyright (c) 2004, 2007 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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Gunnar Wagenknecht - Bug 179695 - [prefs] NPE when using Preferences API without a product
*******************************************************************************/
package org.eclipse.core.internal.preferences;
@@ -184,10 +185,14 @@ public class DefaultPreferences extends EclipsePreferences {
productTranslation = productSpecials.getProductTranslation();
}
productTracker.close();
- } else
+ } else {
PrefsMessages.message("Product-specified preferences called before plugin is started"); //$NON-NLS-1$
+ }
+ if (productCustomization == null)
+ productCustomization = new Properties();
}
- applyDefaults(null, productCustomization, productTranslation);
+ if (!productCustomization.isEmpty())
+ applyDefaults(null, productCustomization, productTranslation);
}
/* (non-Javadoc)

Back to the top