Refactor rename variable "hex_prefixes" to "hexPrefixes" (#1059)
This commit is contained in:
parent
7d7e8af450
commit
67c6450b61
|
@ -666,11 +666,11 @@ public class NumberUtils {
|
|||
throw new NumberFormatException("A blank string is not a valid number");
|
||||
}
|
||||
// Need to deal with all possible hex prefixes here
|
||||
final String[] hex_prefixes = {"0x", "0X", "#"};
|
||||
final String[] hexPrefixes = {"0x", "0X", "#"};
|
||||
final int length = str.length();
|
||||
final int offset = str.charAt(0) == '+' || str.charAt(0) == '-' ? 1 : 0;
|
||||
int pfxLen = 0;
|
||||
for (final String pfx : hex_prefixes) {
|
||||
for (final String pfx : hexPrefixes) {
|
||||
if (str.startsWith(pfx, offset)) {
|
||||
pfxLen += pfx.length() + offset;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue