removed the methods that return null for various getAs methods per discussions with Jesse and Joel.
This commit is contained in:
parent
2d186fbdcd
commit
44faec1eb1
|
@ -17,8 +17,6 @@
|
||||||
package com.google.gson;
|
package com.google.gson;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.math.BigInteger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class representing a Json {@code null} value.
|
* A class representing a Json {@code null} value.
|
||||||
|
@ -44,42 +42,6 @@ public final class JsonNull extends JsonElement {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns null
|
|
||||||
* @since 1.8
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Number getAsNumber() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns null
|
|
||||||
* @Since 1.8
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String getAsString() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns null
|
|
||||||
* @Since 1.8
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BigDecimal getAsBigDecimal() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns null
|
|
||||||
* @Since 1.8
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public BigInteger getAsBigInteger() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void toString(Appendable sb, Escaper escaper) throws IOException {
|
protected void toString(Appendable sb, Escaper escaper) throws IOException {
|
||||||
sb.append("null");
|
sb.append("null");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user