Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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

Back to the top