2012-01-05 13 views
1

私はFindBugsとGWT 2.4(Java 6で使用されています)との間の調和を目指しています。 FindBugsのはGWTとFindBugs:「国際化 - 呼び出されたメソッドのLocaleパラメータ化バージョンの使用を検討する」エラーを解決する方法

Internationalization - Consider using Locale parameterized version of invoked method 

は痛みを癒すためにしようとするとエラーと

childrenStr.append(child.getName().toLowerCase()); 

...このラインについて不平を言う、私はロケール...

childrenStr.append(child.getName().toLowerCase(Locale.ENGLISH)); 

を追加しましたが、その後GWTは死にますコンパイルエラーが発生しました...

[ERROR] Line 346: The method toLowerCase() in the type String is not applicable for the arguments (Locale) 

私はFindBugsのエラーを解決し、GWTを静かに保つために、どのようにして2つの間で永続的な平和を達成することができますか?

おかげで、 - ロケールに敏感String#toLowerCase(Locale)方法についてGWT doesn't include support以来デイブ

答えて

3

とGWTのAPIには、ロケールに敏感小文字変換はありません、suppress FindBugsのDM_CONVERT_CASE警告:

@edu.umd.cs.findbugs.annotations.SuppressWarnings(
    value="DM_CONVERT_CASE", 
    justification="No GWT emulation of String#toLowerCase(Locale)") 
public void lowercaseUser() { 
    childrenStr.append(child.getName().toLowerCase()); 
} 
関連する問題