Skip to content

Commit fa5ecfa

Browse files
committed
fix getInteger and other similar methods
1 parent 3270c2f commit fa5ecfa

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

json/src/main/java/alpine/json/ObjectElement.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,27 @@ public int length() {
7474
}
7575

7676
public byte getByte(String key) {
77-
return (byte) this.getNumber(key, 0);
77+
return this.getNumber(key, 0).byteValue();
7878
}
7979

8080
public short getShort(String key) {
81-
return (short) this.getNumber(key, 0);
81+
return this.getNumber(key, 0).shortValue();
8282
}
8383

8484
public int getInteger(String key) {
85-
return (int) this.getNumber(key, 0);
85+
return this.getNumber(key, 0).intValue();
8686
}
8787

8888
public long getLong(String key) {
89-
return (long) this.getNumber(key, 0);
89+
return this.getNumber(key, 0).longValue();
9090
}
9191

9292
public float getFloat(String key) {
93-
return (float) this.getNumber(key, 0.0F);
93+
return this.getNumber(key, 0.0F).floatValue();
9494
}
9595

9696
public double getDouble(String key) {
97-
return (double) this.getNumber(key, 0.0D);
97+
return this.getNumber(key, 0.0D).doubleValue();
9898
}
9999

100100
public @Nullable Boolean getBoolean(String key) {

0 commit comments

Comments
 (0)