0

質問があいまいすぎる場合はご容赦ください。私はクローバーの専門家ではありませんが、この問題を解決する必要があります。以下のトレースに示すように、クローバーは特定のクラスで問題を抱えているようです。このクラスをクローバーの部分から完全に除外する必要があるのは、クラスがそれほど必要ではないからです。これはクローバーの問題ですか、それとも単なる 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 に制限します。1つの解決策は、誰かが言及したようにファイルを除外することです。別の解決策は、インストルメンテーション レベルを「メソッド」に変更することです。デフォルトではステートメントに設定されています。次の変更を clover-setup タグに組み込む必要があります。

clover-setup instrumentationLevel="メソッド"

于 2017-11-30T09:54:40.023 に答える