@@ -564,9 +564,10 @@ protected Object _deserializeUsingPropertyBased(final JsonParser p, final Deseri
564564 : creator .startBuilding (p , ctxt , _objectIdReader );
565565 TokenBuffer unknown = null ;
566566 final Class <?> activeView = _needViewProcesing ? ctxt .getActiveView () : null ;
567-
568567 JsonToken t = p .currentToken ();
569568 List <BeanReferring > referrings = null ;
569+ final boolean isRecord = _beanType .isRecordType ();
570+
570571 for (; t == JsonToken .PROPERTY_NAME ; t = p .nextToken ()) {
571572 String propName = p .currentName ();
572573 p .nextToken (); // to point to value
@@ -576,14 +577,6 @@ protected Object _deserializeUsingPropertyBased(final JsonParser p, final Deseri
576577 continue ;
577578 }
578579
579- // [databind#4629] Need to check for ignored properties BEFORE checking for Creator properties.
580- // Records (and other creator-based types) will have a valid 'creatorProp', so if we don't
581- // check for ignore first, the ignore configuration will be bypassed.
582- if (IgnorePropertiesUtil .shouldIgnore (propName , _ignorableProps , _includableProps )) {
583- handleIgnoredProperty (p , ctxt , handledType (), propName );
584- continue ;
585- }
586-
587580 // Creator property?
588581 if (creatorProp != null ) {
589582 if ((activeView != null ) && !creatorProp .visibleInView (activeView )) {
@@ -596,13 +589,21 @@ protected Object _deserializeUsingPropertyBased(final JsonParser p, final Deseri
596589 p .skipChildren ();
597590 continue ;
598591 }
592+ // [databind#4629] Need to check for ignored properties for Creator properties since
593+ // Records will have a valid 'creatorProp', so if we don't
594+ // check for ignore first, the ignore configuration will be bypassed.
595+ if (isRecord && IgnorePropertiesUtil .shouldIgnore (propName , _ignorableProps , _includableProps )) {
596+ handleIgnoredProperty (p , ctxt , handledType (), propName );
597+ continue ;
598+ }
599599 // Last creator property to set?
600600 // [databind#4690] cannot quit early as optimization any more
601601 // if (buffer.assignParameter(creatorProp, value)) { ... build ... }
602602 buffer .assignParameter (creatorProp ,
603603 _deserializeWithErrorWrapping (p , ctxt , creatorProp ));
604604 continue ;
605605 }
606+
606607 // regular property? needs buffering
607608 int ix = _propNameMatcher .matchName (propName );
608609 if (ix >= 0 ) {
@@ -1017,6 +1018,7 @@ protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser p, Deseri
10171018 TokenBuffer tokens = ctxt .bufferForInputBuffering (p );
10181019 tokens .writeStartObject ();
10191020
1021+ final boolean isRecord = _beanType .isRecordType ();
10201022 JsonToken t = p .currentToken ();
10211023 for (; t == JsonToken .PROPERTY_NAME ; t = p .nextToken ()) {
10221024 String propName = p .currentName ();
@@ -1028,21 +1030,20 @@ protected Object deserializeUsingPropertyBasedWithUnwrapped(JsonParser p, Deseri
10281030 continue ;
10291031 }
10301032
1031- // Things marked as ignorable should not be passed to any setter
1032- // [databind#4629] Need to check for ignored properties BEFORE checking
1033- // for Creator properties.
1034- if (IgnorePropertiesUtil .shouldIgnore (propName , _ignorableProps , _includableProps )) {
1035- handleIgnoredProperty (p , ctxt , handledType (), propName );
1036- continue ;
1037- }
10381033 if (creatorProp != null ) {
10391034 // [databind#1381]: if useInput=FALSE, skip deserialization from input
10401035 if (creatorProp .isInjectionOnly ()) {
10411036 // Skip the input value, will be injected later in PropertyValueBuffer
10421037 p .skipChildren ();
10431038 continue ;
10441039 }
1045-
1040+ // [databind#4629] Need to check for ignored properties for Creator properties since
1041+ // Records will have a valid 'creatorProp', so if we don't
1042+ // check for ignore first, the ignore configuration will be bypassed.
1043+ if (isRecord && IgnorePropertiesUtil .shouldIgnore (propName , _ignorableProps , _includableProps )) {
1044+ handleIgnoredProperty (p , ctxt , handledType (), propName );
1045+ continue ;
1046+ }
10461047 // Last creator property to set?
10471048 // [databind#4690] cannot quit early as optimization any more
10481049 // if (buffer.assignParameter(creatorProp, value)) { ... build ... }
0 commit comments