示例
public class
ClassA
{{
public void
test () {
SimpleDateFormat sdf =
new
SimpleDateFormat();
}
}
解决方案
始终将 Locale 自变量添加到 SimpleDateFormat 变量声明中
public class
ClassA
{{
public void
test () {
Locale loc = Locale.
US
;
SimpleDateFormat sdf =
new
SimpleDateFormat("", loc);
}
}