mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
fixed sonar rule violations
This commit is contained in:
@@ -61,9 +61,14 @@ public class StringUtils {
|
||||
* @return
|
||||
*/
|
||||
public static Integer stringToInteger(String in) {
|
||||
if (in == null) return null;
|
||||
if (in == null) {
|
||||
return null;
|
||||
}
|
||||
in = in.trim();
|
||||
if (in.length() == 0) return null;
|
||||
if (in.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
return Integer.parseInt(in);
|
||||
} catch (NumberFormatException e) {
|
||||
|
||||
Reference in New Issue
Block a user