ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Becheanu (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (IVYDE-136) When migrating from ivyde alpha to ivyde beta eclipse is throwing NPE at startup
Date Tue, 02 Dec 2008 17:44:44 GMT

    [ https://issues.apache.org/jira/browse/IVYDE-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652436#action_12652436
] 

daniel.becheanu edited comment on IVYDE-136 at 12/2/08 9:42 AM:
----------------------------------------------------------------

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)
@@ -77,7 +77,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 +88,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);
         }
 


      was (Author: daniel.becheanu):
    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.


Mime
View raw message