Skip to content

Commit

Permalink
Add explicit override for JsonParser.getNumberTypeFP()
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Mar 4, 2024
1 parent 1edd7d0 commit b782f4b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import javax.xml.stream.XMLStreamWriter;

import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.core.JsonParser.NumberTypeFP;
import com.fasterxml.jackson.core.base.ParserMinimalBase;
import com.fasterxml.jackson.core.exc.StreamConstraintsException;
import com.fasterxml.jackson.core.io.IOContext;
Expand Down Expand Up @@ -1174,6 +1175,15 @@ public NumberType getNumberType() throws IOException {
return NumberType.BIG_INTEGER;
}

/**
* XML has no notion of natural/native floating-point type (has to be
* provided externally via Schema or so), so need to ensure we indicate that.
*/
@Override // added in 2.17
public NumberTypeFP getNumberTypeFP() throws IOException {
return NumberTypeFP.UNKNOWN;
}

@Override
public Number getNumberValue() throws IOException {
if (_numTypesValid == NR_UNKNOWN) {
Expand Down

0 comments on commit b782f4b

Please sign in to comment.