Skip to content

Commit 63682e7

Browse files
committed
Minor tweaking
1 parent fb677df commit 63682e7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerFactory.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,7 @@ protected void addBackReferenceProperties(DeserializationContext ctxt,
789789
*/
790790
if (beanDesc.isRecordType()) {
791791
ctxt.reportBadTypeDefinition(beanDesc,
792-
"Cannot add back-reference to `java.lang.Record` type '%s' (property '%s')",
793-
beanDesc.getBeanClass().getName(),
792+
"Cannot add back-reference to a `java.lang.Record` type (property '%s')",
794793
refProp.getName());
795794
}
796795
String refName = refProp.findReferenceName();

src/test-jdk17/java/com/fasterxml/jackson/databind/records/RecordBackReference5188Test.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public void testRecordDeserializationFail() throws Exception {
2727
MAPPER.readValue(json, Parent.class);
2828
fail("Should not pass");
2929
} catch (InvalidDefinitionException e) {
30-
verifyException(e, "Cannot add back-reference to `java.lang.Record` type ");
31-
verifyException(e, "Invalid type definition for");
30+
verifyException(e, "Cannot add back-reference to a `java.lang.Record` type");
31+
verifyException(e, "Invalid type definition for ");
3232
verifyException(e, "(property 'parent')");
3333
}
3434
}

0 commit comments

Comments
 (0)