Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GWT和FindBugs:如何解决;国际化-考虑使用调用方法的区域参数化版本>;错误?_Gwt_Locale_Findbugs - Fatal编程技术网

GWT和FindBugs:如何解决;国际化-考虑使用调用方法的区域参数化版本>;错误?

GWT和FindBugs:如何解决;国际化-考虑使用调用方法的区域参数化版本>;错误?,gwt,locale,findbugs,Gwt,Locale,Findbugs,我试图在FindBugs和GWT2.4(与Java6一起使用)之间实现协调。FindBugs抱怨这条线 childrenStr.append(child.getName().toLowerCase()); 带着错误 Internationalization - Consider using Locale parameterized version of invoked method 为了治愈疼痛,我添加了一个区域设置 childrenStr.append(child.getName().to

我试图在FindBugs和GWT2.4(与Java6一起使用)之间实现协调。FindBugs抱怨这条线

childrenStr.append(child.getName().toLowerCase());
带着错误

Internationalization - Consider using Locale parameterized version of invoked method
为了治愈疼痛,我添加了一个区域设置

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安静

谢谢,-Dave

因为GWT支持区分区域设置的方法,而且GWT API中没有区分区域设置的小写转换,FindBugs警告:

@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());
}