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

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          2d 2h 1m 1 Nicolas Lalevée 04/Dec/08 19:40
          Nicolas Lalevée made changes -
          Link This issue is duplicated by IVYDE-184 [ IVYDE-184 ]
          Nicolas Lalevée made changes -
          Link This issue is duplicated by IVYDE-147 [ IVYDE-147 ]
          Nicolas Lalevée made changes -
          Affects Version/s 2.0.0.beta1 [ 12313273 ]
          Nicolas Lalevée made changes -
          Fix Version/s 2.0.0.final [ 12313533 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Nicolas Lalevée [ hibou ]
          Resolution Fixed [ 1 ]
          Hide
          Nicolas Lalevée added a comment -

          Thank you Daniel.

          Show
          Nicolas Lalevée added a comment - Thank you Daniel.
          Daniel Becheanu made changes -
          Attachment Patch_IvyDEPreferenceStoreHelper.txt [ 12395313 ]
          Daniel Becheanu made changes -
          Field Original Value New Value
          Attachment rad_stack_trace.txt [ 12395311 ]
          Hide
          Daniel Becheanu added a comment -

          Stack trace.

          Show
          Daniel Becheanu added a comment - Stack trace.
          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 - - 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
          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
          Daniel Becheanu created issue -

            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