2010-07-20 48 views
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 
+0

有人能說些什麼......什麼 – Afamee 2010-07-20 22:19:41

+0

最有可能的Java問題。 Java限制字節碼的單個方法可以是最大64Kb。否則你會得到「代碼太大」的錯誤。 regionNameByCode方法有多大? – JoseK 2010-07-21 05:50:06

+0

感謝您的回覆。它相當巨大......因此是問題所在。有沒有一種方法來過濾(如螞蟻)出三葉草儀器的特定班級?這樣我們根本不會處理這個課程。如果是這樣,三葉草文件可以做到這一點。非常感謝 – Afamee 2010-07-21 12:02:23

回答

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

0

的Java限制了該方法的字節碼大小爲64KB爲由其他貢獻者解釋。 一個解決方案是排除某個人提到的文件。 另一種解決方案是將檢測級別更改爲「方法」。默認情況下,它被設置爲語句。以下更改必須納入三葉草設置標籤。

三葉草設置instrumentationLevel = 「方法」