0

如果问题太模糊,请原谅我。我不是三叶草专家,但我需要解决这个问题。Clover 似乎对特定类有问题,如下面的跟踪所示。我需要完全从三叶草部分中排除这个类,因为这个类并不是所有必要的。这甚至是三叶草问题还是只是 java 问题?再次感谢,对不起,如果这只是微不足道的。

enter code here   [javac] [apt] warning: Annotation types without processors:  [java.lang.SuppressWarnings]
  [apt] 1 warning
   [apt] Ignoring compiler attribute for the APT task, as it is fixed
[javac] Compiling 268 source files to  /home/retail_website/build/.src/Platform/AlibrisBiz/build/classes
[clover] Clover Version 2.6.0, built on September 09 2009 (build-771)
[clover] Loaded from: /home/retail_website/build/clover/clover.jar
[clover] Clover: Commercial License registered to Alibris.
[clover] Updating existing database at '/home/retail_website/build/clover.database/clover.db'.
[clover] Processing files at 1.5 source level.
[clover] Clover all over. Instrumented 268 files (27 packages).
[clover] Elapsed time = 7.155 secs. (37.456 files/sec, 9,859.259 /tmp/clover51982.tmp/com/maxmind/geoip/regionName.java:4: code too large for try statement
[javac] static public String regionNameByCode(String country_code,String region_code) {try{__CLR2_6_09so9sogbuuz0jf.R.inc(12696);
[javac]                                                                                   ^
[javac] /tmp/clover51982.tmp/com/maxmind/geoip/regionName.java:4: code too large
[javac] static public String regionNameByCode(String country_code,String region_code) {try{__CLR2_6_09so9sogbuuz0jf.R.inc(12696);
[javac]                      ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors
4

2 回答 2

0

是的,您可以从 ant 任务中排除包级别的类。

http://confluence.atlassian.com/display/CLOVER/6.+Ant+Task+Reference

例子

<clover-setup enabled="${enable}">
     <files>
       <exclude name="**/cenqua/clover/**/*.java"/>
     </files>
</clover-setup>

在http://confluence.atlassian.com/display/CLOVER/clover-setup查看更多信息

如果您使用 Maven 运行,请按照此http://confluence.atlassian.com/display/CLOVER/Clover-for-Maven+2+User%27s+Guide#Clover-for-Maven2User%27sGuide-ControllingwhichSourceFilesareInstrumented

于 2010-07-22T05:40:20.763 回答
0

正如其他贡献者所解释的,Java 将方法字节码大小限制为 64kb。一种解决方案是排除某些人提到的文件。另一种解决方案是将检测级别更改为“方法”。默认情况下,它设置为语句。以下更改必须包含在 clover-setup 标签中。

三叶草设置仪器级别=“方法”

于 2017-11-30T09:54:40.023 回答