Menu

#9 Adding ignored packages does not work

open-fixed
nobody
None
5
2012-07-09
2012-07-06
Anonymous
No

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

Discussion

  • Tom Jordahl

    Tom Jordahl - 2012-07-09

    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.

     
  • Tom Jordahl

    Tom Jordahl - 2012-07-09
    • status: open --> open-fixed