Skip to content

Commit

Permalink
renamed NumberType.valueOf to parse
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille committed Jan 2, 2024
1 parent 2eb0811 commit 96018be
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected <N extends Number> N readValueAsNumber(NumberType<N> type) {
return null;
}
try {
return type.valueOf(value);
return type.parse(value);
} catch (RuntimeException e) {
throw error(value, type.getType(), e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected <N extends Number> N readValueAsNumber(NumberType<N> numberType) {
}
} else if (value instanceof String) {
try {
return numberType.valueOf(value.toString());
return numberType.parse(value.toString());
} catch (RuntimeException e) {
throw error(value, numberType.getType(), e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected <N extends Number> N readValueAsNumber(NumberType<N> type) {
} else if (type == NumberType.LONG) {
result = (N) Long.valueOf(this.json.getLong());
} else {
result = type.valueOf(this.json.getString());
result = type.parse(this.json.getString());
}
next();
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ protected <N extends Number> N readValueAsNumber(NumberType<N> numberType) {
return null;
}
try {
return numberType.valueOf(value);
return numberType.parse(value);
} catch (RuntimeException e) {
throw error(value, numberType.getType(), e);
}
Expand Down

0 comments on commit 96018be

Please sign in to comment.