Skip to content

Commit b782f4b

Browse files
committed
Add explicit override for JsonParser.getNumberTypeFP()
1 parent 1edd7d0 commit b782f4b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import javax.xml.stream.XMLStreamWriter;
1414

1515
import com.fasterxml.jackson.core.*;
16+
import com.fasterxml.jackson.core.JsonParser.NumberTypeFP;
1617
import com.fasterxml.jackson.core.base.ParserMinimalBase;
1718
import com.fasterxml.jackson.core.exc.StreamConstraintsException;
1819
import com.fasterxml.jackson.core.io.IOContext;
@@ -1174,6 +1175,15 @@ public NumberType getNumberType() throws IOException {
11741175
return NumberType.BIG_INTEGER;
11751176
}
11761177

1178+
/**
1179+
* XML has no notion of natural/native floating-point type (has to be
1180+
* provided externally via Schema or so), so need to ensure we indicate that.
1181+
*/
1182+
@Override // added in 2.17
1183+
public NumberTypeFP getNumberTypeFP() throws IOException {
1184+
return NumberTypeFP.UNKNOWN;
1185+
}
1186+
11771187
@Override
11781188
public Number getNumberValue() throws IOException {
11791189
if (_numTypesValid == NR_UNKNOWN) {

0 commit comments

Comments
 (0)