Adding ignored packages does not work
Brought to you by:
patriot1burke
Hello
Adding ignored packages using the addIgnoredPackages() method does not actually add anything, as it doesn't update the array field.
Consider the current implementation of the method
protected transient String[] ignoredPackages = {"javax", "java", "sun", "com.sun", "javassist"};
public void addIgnoredPackages(String... ignored)
{
String[] tmp = new String[ignoredPackages.length + ignored.length];
int i = 0;
for (String ign : ignoredPackages) tmp[i++] = ign;
for (String ign : ignored) tmp[i++] = ign;
}
It's clearly visible that the new packages are not added to the ignoredPackages.
Cheers
Mladen
Hi Mladen,
This was fixed in the mainline code - see AnnotationDB.java revision 11. The current revision is 12.
I would recommend getting the current source from SVN and building a jar from those sources.