Uploaded image for project: 'IvyDE'
  1. IvyDE
  2. IVYDE-209

conf attributes must not be null

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: classpath container
    • Labels:
      None
    • Environment:

      Windows, Eclipse 3.4 with default WTP, RSA 7.5.3

      Description

      With revision 815394 comes a change in IvydeContainerPage from:

      IClasspathAttribute[] atts = IvyClasspathContainerConfAdapter.getAttributes(conf);
      

      to

      IClasspathAttribute[] atts = conf.getAttributes();
      

      Unfortunately it causes NPE when exporting Dynamic web project in RSA 7.5.3 and older WTP plugins (that comes with 3.4.x bundle).
      Sorry, I don't have stacktrace at the moment.

      I have fixed it in our build by adding

              IClasspathAttribute[] atts = conf.getAttributes();
              // ILX: atts must not be null
              if (atts == null) {
                  atts = new ClasspathAttribute[0];
              }
      

      but I guess this shouldn't be neccessary if IvyClasspathContainerConfiguration returns zero length array instead of null.
      I propose to fix IvyClasspathContainerConfiguration by initializing member attributes to an empty array and making sure it never gets initialized to null.

        Attachments

          Activity

            People

            • Assignee:
              hibou Nicolas Lalevée
              Reporter:
              iloncar Ivica Loncar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified