conf attributes must not be null
--------------------------------

                 Key: IVYDE-209
                 URL: https://issues.apache.org/jira/browse/IVYDE-209
             Project: IvyDE
          Issue Type: Bug
          Components: classpath container
         Environment: Windows, Eclipse 3.4 with default WTP, RSA 7.5.3
            Reporter: Ivica Loncar


With revision 815394 comes a change in IvydeContainerPage from:
{code:java}
IClasspathAttribute[] atts = 
IvyClasspathContainerConfAdapter.getAttributes(conf);
{code}
to
{code:java}
IClasspathAttribute[] atts = conf.getAttributes();
{code}

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 
{code:java}
        IClasspathAttribute[] atts = conf.getAttributes();
        // ILX: atts must not be null
        if (atts == null) {
            atts = new ClasspathAttribute[0];
        }
{code}

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.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to