removed the methods that return null for various getAs methods per discussions with Jesse and Joel.

This commit is contained in:
Inderjeet Singh 2011-05-27 17:58:39 +00:00
parent 2d186fbdcd
commit 44faec1eb1

View File

@ -17,8 +17,6 @@
package com.google.gson;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
/**
* A class representing a Json {@code null} value.
@ -44,42 +42,6 @@ public final class JsonNull extends JsonElement {
// 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
protected void toString(Appendable sb, Escaper escaper) throws IOException {
sb.append("null");