目前已轉(zhuǎn)至個(gè)人博客,本系列地址:Lam's Blog - Knowledge as Action
DM_DEFAULT_ENCODING
- 翻譯
Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behaviour to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.
某方法將字節(jié)轉(zhuǎn)換為字符串嚼松,并且假定默認(rèn)的平臺(tái)編碼是合適的锰扶,這會(huì)導(dǎo)致程序在不同平臺(tái)上存在異常情況,請(qǐng)使用指定的字節(jié)編碼進(jìn)行轉(zhuǎn)碼 - 原因
在進(jìn)行字符串轉(zhuǎn)換時(shí)沒有指定特定編碼 - 解決方案
添加Charset.defaultCharset()
DM_CONVERT_CASE
Consider using Locale parameterized version of invoked method
使用平臺(tái)默認(rèn)的編碼格式對(duì)字符串進(jìn)行大小寫轉(zhuǎn)換少辣,這可能導(dǎo)致國(guó)際字符的轉(zhuǎn)換不當(dāng)。使用以下方式對(duì)字符進(jìn)行轉(zhuǎn)換
String.toUpperCase( Locale l )
String.toLowerCase( Locale l )
其他文章(持續(xù)更新)
FindBugs:簡(jiǎn)介與使用
FindBugs 規(guī)則整理:CORRECTNESS
FindBugs 規(guī)則整理:Bad Practice
FindBugs 規(guī)則整理:Style & Dodgy
FindBugs 規(guī)則整理:Malicious Code Vulnerability
FindBugs 規(guī)則整理:Multithreaded Correctness
FindBugs 規(guī)則整理:Performance
引用
整合以下文章過(guò)程中發(fā)現(xiàn)部分存在翻譯錯(cuò)誤锨亏,已做修正忙干,同時(shí)感謝以下文章作者
FindBugs規(guī)則整理