Skip to content

Commit 59447f3

Browse files
committed
Fixes wrt [core#1378]
1 parent 87972cd commit 59447f3

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

jakarta-jsonp/src/main/java/tools/jackson/datatype/jsonp/JsonValueDeserializer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected JsonObject _deserializeObject(JsonParser p, DeserializationContext ctx
127127
}
128128
break;
129129
case VALUE_STRING:
130-
b.add(name, p.getText());
130+
b.add(name, p.getString());
131131
break;
132132
case VALUE_EMBEDDED_OBJECT: {
133133
// 26-Nov-2014, tatu: As per [issue#5], should be able to support
@@ -185,7 +185,7 @@ protected JsonArray _deserializeArray(JsonParser p, DeserializationContext ctxt)
185185
}
186186
break;
187187
case VALUE_STRING:
188-
b.add(p.getText());
188+
b.add(p.getString());
189189
break;
190190
default:
191191
return (JsonArray) ctxt.handleUnexpectedToken(getValueType(ctxt), p);
@@ -228,7 +228,7 @@ protected JsonValue _deserializeScalar(JsonParser p, DeserializationContext ctxt
228228
}
229229
}
230230
case VALUE_STRING:
231-
return _builderFactory.createArrayBuilder().add(p.getText()).build().get(0);
231+
return _builderFactory.createArrayBuilder().add(p.getString()).build().get(0);
232232
default: // errors, should never get here
233233
// case END_ARRAY:
234234
// case END_OBJECT:

jakarta-mail/src/main/java/tools/jackson/datatype/jakarta/mail/JakartaInternetAddressDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public InternetAddress deserialize(JsonParser p, DeserializationContext ctxt) th
4242
return (InternetAddress) ctxt.handleUnexpectedToken(InternetAddress.class, p);
4343
}
4444

45-
final String address = p.getText();
45+
final String address = p.getString();
4646
try {
4747
return new InternetAddress(address);
4848
} catch (AddressException e) {

joda-money/src/main/java/tools/jackson/datatype/jodamoney/CurrencyUnitDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public CurrencyUnit deserialize(final JsonParser p,
1919
final DeserializationContext ctxt)
2020
{
2121
if (p.hasToken(JsonToken.VALUE_STRING)) {
22-
final String currencyCode = p.getText();
22+
final String currencyCode = p.getString();
2323
try {
2424
return CurrencyUnit.of(currencyCode);
2525
} catch (Exception e) {

json-org/src/main/java/tools/jackson/datatype/jsonorg/JSONArrayDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public JSONArray deserialize(JsonParser p, DeserializationContext ctxt)
4747
array.put(JSONObjectDeserializer.instance.deserialize(p, ctxt));
4848
continue;
4949
case VALUE_STRING:
50-
array.put(p.getText());
50+
array.put(p.getString());
5151
continue;
5252
case VALUE_NULL:
5353
array.put(JSONObject.NULL);

json-org/src/main/java/tools/jackson/datatype/jsonorg/JSONObjectDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public JSONObject deserialize(JsonParser p, DeserializationContext ctxt)
4444
ob.put(fieldName, deserialize(p, ctxt));
4545
continue;
4646
case VALUE_STRING:
47-
ob.put(fieldName, p.getText());
47+
ob.put(fieldName, p.getString());
4848
continue;
4949
case VALUE_NULL:
5050
ob.put(fieldName, JSONObject.NULL);

jsr-353/src/main/java/tools/jackson/datatype/jsr353/JsonPatchDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public LogicalType logicalType() {
2828
@Override
2929
public JsonPatch deserialize(JsonParser p, DeserializationContext ctxt) throws JacksonException {
3030
if (p.currentToken() != JsonToken.START_ARRAY) {
31-
throw InvalidFormatException.from(p, "JSON patch has to be an array of objects", p.getText(),
31+
throw InvalidFormatException.from(p, "JSON patch has to be an array of objects", p.getString(),
3232
handledType());
3333
}
3434
return provider.createPatch(jsonValueDeser._deserializeArray(p, ctxt));

jsr-353/src/main/java/tools/jackson/datatype/jsr353/JsonValueDeserializer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected JsonObject _deserializeObject(JsonParser p, DeserializationContext ctx
127127
}
128128
break;
129129
case VALUE_STRING:
130-
b.add(name, p.getText());
130+
b.add(name, p.getString());
131131
break;
132132
case VALUE_EMBEDDED_OBJECT: {
133133
// 26-Nov-2014, tatu: As per [issue#5], should be able to support
@@ -185,7 +185,7 @@ protected JsonArray _deserializeArray(JsonParser p, DeserializationContext ctxt)
185185
}
186186
break;
187187
case VALUE_STRING:
188-
b.add(p.getText());
188+
b.add(p.getString());
189189
break;
190190
default:
191191
return (JsonArray) ctxt.handleUnexpectedToken(getValueType(ctxt), p);
@@ -228,7 +228,7 @@ protected JsonValue _deserializeScalar(JsonParser p, DeserializationContext ctxt
228228
}
229229
}
230230
case VALUE_STRING:
231-
return _builderFactory.createArrayBuilder().add(p.getText()).build().get(0);
231+
return _builderFactory.createArrayBuilder().add(p.getString()).build().get(0);
232232
default: // errors, should never get here
233233
// case END_ARRAY:
234234
// case END_OBJECT:

0 commit comments

Comments
 (0)