ant daily build 学习五(findbugs多文件合并细节问题)

上一篇文章中谈及到fingbugs的使用,此篇文章阐述一下使用中注意的事项:

 

在使用FindBugs是会报告如下错误java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)

官方文档中给与如下说明

 

The problem here is that the wrong version of the Apache BCEL library is being found.  FindBugs requires its own version of BCEL, which normally will be used automatically when you invoke the findbugs or findbugs.bat scripts used to launch FindBugs.  If an old version of BCEL is installed in a location, such as "lib/endorsed" in the JRE installation, where it overrides classes on the application classpath, FindBugs will not execute properly.  We know of several reasons this could happen

  • If you install the Java(TM) Web Services Developer Pack 1.2 in the lib/endorsed directory of your Java Runtime Environment (JRE).  The file xsltc.jar contains an old version of BCEL that is incompatible with FindBugs. 
  • Another possibility is that you are using the IBM JDK.  Some versions include a version of BCEL which conflicts with the one required by FindBugs.  This problem is fixed in version 1.4.1 SP1, so upgrading your JDK should allow FindBugs to run correctly.
  • Some versions of the Apache Xalan XSLT processor include an old version of BCEL in xalan.jar.

In all of these cases, you should be able to run FindBugs by either removing the offending version of BCEL from your JRE, or installing a clean JRE or JDK and using that to run FindBugs.

 

 

 

看上去好像很繁琐吧,其实只有两个文件在作怪,就是ant核心lib下的xalen.jar 和xslt.jar。删除此文件便可以进行使用。

 

 

此时使用正常,但是合并出来的文件缺少很多内容,经过查看源码发现时FindBugs中的代码,此代码文件为edu.umd.cs.findbugs.workflow.UnionResults出现错误,并且查到进行了修改当提交tracker时发现有人提交过

下面是官方的tracker截图



 其中用红线框标注的为提交的bug类用户可以到如下界面中了解具体情况http://sourceforge.net/tracker/?atid=614695&group_id=96405&func=browse

 

附件中会给出修改后的源代码文件

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值