IvyDE
  1. IvyDE
  2. IVYDE-136

When migrating from ivyde alpha to ivyde beta eclipse is throwing NPE at startup

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0.beta1
    • Fix Version/s: 2.0.0.final
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows

      Description

      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); }

      }

      1. Patch_IvyDEPreferenceStoreHelper.txt
        1 kB
        Daniel Becheanu
      2. rad_stack_trace.txt
        33 kB
        Daniel Becheanu

        Issue Links

          Activity

          Hide
          Daniel Becheanu added a comment -

          This is happening in eclipse 3.4 and RAD7.5

          Show
          Daniel Becheanu added a comment - This is happening in eclipse 3.4 and RAD7.5
          Hide
          Daniel Becheanu added a comment - - edited

          Patch

              1. 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); }
          Show
          Daniel Becheanu added a comment - - edited 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); }
          Hide
          Nicolas Lalevée added a comment -

          Can you show a stacktrace ?
          And the patch you provided, could you attach it as file to this issue. Your comment is not readable as is.

          Show
          Nicolas Lalevée added a comment - Can you show a stacktrace ? And the patch you provided, could you attach it as file to this issue. Your comment is not readable as is.
          Hide
          Daniel Becheanu added a comment -

          Stack trace.

          Show
          Daniel Becheanu added a comment - Stack trace.
          Hide
          Nicolas Lalevée added a comment -

          Thank you Daniel.

          Show
          Nicolas Lalevée added a comment - Thank you Daniel.

            People

            • Assignee:
              Nicolas Lalevée
              Reporter:
              Daniel Becheanu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development