@@ -1153,14 +1153,14 @@ public JsonCreator.Mode findCreatorAnnotation(MapperConfig<?> config, Annotated
1153
1153
1154
1154
/**
1155
1155
* Method called to check if introspector can find a Creator it considers
1156
- * the "Primary Creator": Creator to use as the primary one, when no Creator has
1156
+ * its "Preferred Creator": Creator to use as the primary one, when no Creator has
1157
1157
* explicit annotation ({@link #findCreatorAnnotation} returns {@code null}).
1158
- * Examples of default creators include the canonical constructor defined by
1158
+ * Examples of preferred creators include the canonical constructor defined by
1159
1159
* Java Records; "Data" classes by frameworks
1160
1160
* like Lombok and JVM languages like Kotlin and Scala (case classes) also have
1161
1161
* similar concepts.
1162
1162
* If introspector can determine that one of given {@link PotentialCreator}s should
1163
- * be considered the primary , it should return it; if not, should return {@code null}.
1163
+ * be considered preferred one , it should return it; if not, it should return {@code null}.
1164
1164
* Note that core databind functionality may call this method even in the presence of
1165
1165
* explicitly annotated creators; and may or may not use Creator returned depending
1166
1166
* on other criteria.
@@ -1171,10 +1171,8 @@ public JsonCreator.Mode findCreatorAnnotation(MapperConfig<?> config, Annotated
1171
1171
* NOTE: method is NOT called for Java Record types; selection of the canonical constructor
1172
1172
* as the Primary creator is handled directly by {@link POJOPropertiesCollector}
1173
1173
*<p>
1174
- * NOTE: naming of this method is unfortunately inconsistent in that "default Creator"
1175
- * has other meanings than "primary Creator" -- in other places Jackson code
1176
- * refers to no-arguments Constructors as "default Creators". So this method
1177
- * ought to have been named {@code findPrimaryCreator()}.
1174
+ * NOTE: was called {@code findDefaultCreator()} in Jackson 2.x but was renamed
1175
+ * due to possible confusion with 0-argument "default" constructor.
1178
1176
*
1179
1177
* @param config Configuration settings in effect (for deserialization)
1180
1178
* @param valueClass Class being instantiated; defines Creators passed
@@ -1186,7 +1184,7 @@ public JsonCreator.Mode findCreatorAnnotation(MapperConfig<?> config, Annotated
1186
1184
*
1187
1185
* @since 2.18
1188
1186
*/
1189
- public PotentialCreator findDefaultCreator (MapperConfig <?> config ,
1187
+ public PotentialCreator findPreferredCreator (MapperConfig <?> config ,
1190
1188
AnnotatedClass valueClass ,
1191
1189
List <PotentialCreator > declaredConstructors ,
1192
1190
List <PotentialCreator > declaredFactories ) {
0 commit comments