Set return type from double to float

This commit is contained in:
Roman Zhuravlev 2023-09-18 16:16:22 +05:00
parent ee9a6db15a
commit caee3c9080

View file

@ -199,7 +199,7 @@ public class StringUtils {
previous = c; previous = c;
} }
list.add(builder.toString()); if (builder.length() > 0) list.add(builder.toString());
return list.toArray(new String[0]); return list.toArray(new String[0]);
} }
@ -306,7 +306,7 @@ public class StringUtils {
} }
} }
public static double parseFloat(String str, float def) { public static float parseFloat(String str, float def) {
try { try {
return Float.parseFloat(str); return Float.parseFloat(str);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {