[
https://issues.apache.org/jira/browse/IVYDE-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652436#action_12652436
]
Daniel Becheanu commented on IVYDE-136:
---------------------------------------
Patch
### Eclipse Workspace Patch 1.0
#P IvyDe
Index:
org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java
===================================================================
---
org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java
(revision 722496)
+++
org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/preferences/IvyDEPreferenceStoreHelper.java
(working copy)
@@ -21,7 +21,6 @@
import java.util.List;
import org.apache.ivyde.eclipse.cpcontainer.IvyClasspathUtil;
-import org.eclipse.jface.preference.IPreferenceStore;
public class IvyDEPreferenceStoreHelper {
@@ -77,7 +76,7 @@
if (b) {
// not the default value, so it has been set
// erase the deprecated preference and store the new one
- prefStore.setValue(PreferenceConstants.DO_RETRIEVE_DEPRECATED,
null);
+ prefStore.setValue(PreferenceConstants.DO_RETRIEVE_DEPRECATED, "");
prefStore.setValue(PreferenceConstants.DO_RETRIEVE, b);
}
@@ -88,7 +87,7 @@
if (s != null && s.length() != 0) {
// not the default value, so it has been set
// erase the deprecated preference and store the new one
-
prefStore.setValue(PreferenceConstants.RETRIEVE_PATTERN_DEPRECATED, null);
+
prefStore.setValue(PreferenceConstants.RETRIEVE_PATTERN_DEPRECATED, "");
prefStore.setValue(PreferenceConstants.RETRIEVE_PATTERN, s);
}
> When migrating from ivyde alpha to ivyde beta eclipse is throwing NPE at
> startup
> --------------------------------------------------------------------------------
>
> Key: IVYDE-136
> URL: https://issues.apache.org/jira/browse/IVYDE-136
> Project: IvyDE
> Issue Type: Bug
> Environment: Windows
> Reporter: Daniel Becheanu
>
> When migrating from ivyde alpha to ivyde beta eclipse is throwing NPE at
> startup.
> The problem seems to be in IvyDEPreferenceStoreHelper. This class tries to
> invoke IPreferenceStore.putValue with null newValue but the implementation
> from
> org.eclipse.core.internal.preferences.EclipsePreferences does not accept
> nulls.
> public void put(String key, String newValue)
> {
> if(key == null || newValue == null)
> throw new NullPointerException();
> String oldValue = internalPut(key, newValue);
> if(!newValue.equals(oldValue))
> {
> makeDirty();
> firePreferenceEvent(key, oldValue, newValue);
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.