Refactor rename variable "hex_prefixes" to "hexPrefixes" (#1059)

This commit is contained in:
徐梦旗 2023-04-20 21:00:51 +08:00 committed by GitHub
parent 7d7e8af450
commit 67c6450b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;