@@ -783,11 +783,19 @@ public void removeIgnored()
783783 _ctorParameters = _removeIgnored (_ctorParameters );
784784 }
785785
786+ @ Deprecated // since 2.12
787+ public JsonProperty .Access removeNonVisible (boolean inferMutators ) {
788+ return removeNonVisible (inferMutators , null );
789+ }
790+
786791 /**
787792 * @param inferMutators Whether mutators can be "pulled in" by visible
788793 * accessors or not.
794+ *
795+ * @since 2.12 (earlier had different signature)
789796 */
790- public JsonProperty .Access removeNonVisible (boolean inferMutators )
797+ public JsonProperty .Access removeNonVisible (boolean inferMutators ,
798+ POJOPropertiesCollector parent )
791799 {
792800 /* 07-Jun-2015, tatu: With 2.6, we will allow optional definition
793801 * of explicit access type for property; if not "AUTO", it will
@@ -799,6 +807,15 @@ public JsonProperty.Access removeNonVisible(boolean inferMutators)
799807 }
800808 switch (acc ) {
801809 case READ_ONLY :
810+ // [databind#2719]: Need to add ignorals, first, keeping in mind
811+ // we have not yet resolved explicit names, so include implicit
812+ // and possible explicit names
813+ if (parent != null ) {
814+ parent ._collectIgnorals (getName ());
815+ for (PropertyName pn : findExplicitNames ()) {
816+ parent ._collectIgnorals (pn .getSimpleName ());
817+ }
818+ }
802819 // Remove setters, creators for sure, but fields too if deserializing
803820 _setters = null ;
804821 _ctorParameters = null ;
0 commit comments