Menu

#643 Findbugs ant-task: class location path issue with wildcard 2

closed-wont-fix
Ant task (38)
3
2008-12-30
2008-08-25
No

trying the example from
http://findbugs.sourceforge.net/manual/datamining.html#antexample with
setting the class location to a path containing wildcards pointing to several classes will not result
in the expected behaviour.

Version used:
findbugs-1.3.4

Example:

...
<findbugs home="${findbugs.home}"
output="xml:withMessages"
timeout="90000000"
reportLevel="experimental"
workHard="true"
effort="max"
adjustExperimental="true"
jvmargs="${jvmargs}"
failOnError="true"
outputFile="out.xml"
projectName="Findbugs"
debug="false">
<class location="generated/mypackage/*.class" />
</findbugs>
...

Result:
Exception in thread "main" java.io.IOException: IOException while scanning codebases
at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:226)
at edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:1531)
at edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1012)
Caused by: edu.umd.cs.findbugs.classfile.ResourceNotFoundException: Resource not found: generated\mypackage\*.class
at edu.umd.cs.findbugs.classfile.impl.SingleFileCodeBase.getClassDescriptor(SingleFileCodeBase.java:225)
at edu.umd.cs.findbugs.classfile.impl.SingleFileCodeBaseEntry.getClassDescriptor(SingleFileCodeBaseEntry.java:63)
at edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.build(ClassPathBuilder.java:221)
at edu.umd.cs.findbugs.FindBugs2.buildClassPath(FindBugs2.java:576)
at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:175)
... 2 more

Expected:
instead of calling SingleFileCodeBase the ClassPathBuilder should notice that he need to load several files or at least throw an error message that only single files or complete directories are allowed

Note:
-

Origin:
see Stacktrace

Discussion

  • Mark Daly

    Mark Daly - 2008-11-24

    Repro/test case committed, reassigning for further investigation.

     
  • Mark Daly

    Mark Daly - 2008-11-24
    • assigned_to: nobody --> wpugh
     
  • William Pugh

    William Pugh - 2008-12-30

    We do not support the use of wildcards in <class ...> elements for the FindBugs task

     
  • William Pugh

    William Pugh - 2008-12-30
    • priority: 5 --> 3
    • status: open --> closed-wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB