Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] ArrayIndexOutOfBounds exception


That is some legacy code.  It assumes that both will have the same # of elements.  If you can create a use case in PDE which causes this problem, please open a bug and we can take a look.

Brian Bauman
    IBM Software Group - Austin, TX
    Eclipse Committer
    baumanbr@xxxxxxxxxx
    (512) 838 -2938 (T/L 678-2938)



From: "Aleksandr Kravets" <aleksandr.kravets@xxxxxxxxx>
To: pde-dev@xxxxxxxxxxx
Date: 12/17/2007 09:32 AM
Subject: [pde-dev] ArrayIndexOutOfBounds exception





Hello,

I am reusing some of the classes in PDE for my own manifest consistency checker. I've ran into an issue where when I import two packages with the same name: Import-Package: com.test.a, com.test.a I get an ArrayIndexOutOfBoundsException in validateImportPackage(IProgessM

onitor monitor) method of the BundleErrorReporter.

I've traced the calls and what happens in that in StateBuilder.addImportPackages duplicates are removed from imports and when imports make it into BundleErrorReporter there is a nested for loop on elements and imports arrays in validateImportPackage(IProgressMonitor monitor) where ArrayIndexOutOfBoundsException occurs because at that point imports.length < elements.length by 1.

My question is why does imports are checked for duplicates and elements are not?

thanks,
Alex
_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev


Back to the top