@@ -651,19 +651,19 @@ protected void _addCreators(Map<String, POJOPropertyBuilder> props)
651
651
// Then find what is the Primary Constructor (if one exists for type):
652
652
// for Java Records and potentially other types too ("data classes"):
653
653
// Needs to be done early to get implicit names populated
654
- final PotentialCreator canonical ;
654
+ final PotentialCreator primary ;
655
655
if (_isRecordType ) {
656
- canonical = JDK14Util .findCanonicalRecordConstructor (_config , _classDef , constructors );
656
+ primary = JDK14Util .findCanonicalRecordConstructor (_config , _classDef , constructors );
657
657
} else {
658
- canonical = _annotationIntrospector .findPrimaryCreator (_config , _classDef ,
658
+ primary = _annotationIntrospector .findPrimaryCreator (_config , _classDef ,
659
659
constructors , factories );
660
660
}
661
661
// Next: remove creators marked as explicitly disabled
662
662
_removeDisabledCreators (constructors );
663
663
_removeDisabledCreators (factories );
664
664
665
665
// And then remove non-annotated static methods that do not look like factories
666
- _removeNonFactoryStaticMethods (factories , canonical );
666
+ _removeNonFactoryStaticMethods (factories , primary );
667
667
668
668
// and use annotations to find explicitly chosen Creators
669
669
if (_useAnnotations ) { // can't have explicit ones without Annotation introspection
@@ -683,16 +683,16 @@ protected void _addCreators(Map<String, POJOPropertyBuilder> props)
683
683
684
684
// But if no annotation-based Creators found, find/use Primary Creator
685
685
// detected earlier, if any
686
- if (canonical != null ) {
686
+ if (primary != null ) {
687
687
if (!creators .hasPropertiesBased ()) {
688
688
// ... but only process if still included as a candidate
689
- if (constructors .remove (canonical )
690
- || factories .remove (canonical )) {
689
+ if (constructors .remove (primary )
690
+ || factories .remove (primary )) {
691
691
// But wait! Could be delegating
692
- if (_isDelegatingConstructor (canonical )) {
693
- creators .addExplicitDelegating (canonical );
692
+ if (_isDelegatingConstructor (primary )) {
693
+ creators .addExplicitDelegating (primary );
694
694
} else {
695
- creators .setPropertiesBased (_config , canonical , "Primary" );
695
+ creators .setPropertiesBased (_config , primary , "Primary" );
696
696
}
697
697
}
698
698
}
@@ -720,12 +720,12 @@ protected void _addCreators(Map<String, POJOPropertyBuilder> props)
720
720
721
721
// And finally add logical properties for the One Properties-based
722
722
// creator selected (if any):
723
- PotentialCreator primary = creators .propertiesBased ;
724
- if (primary == null ) {
723
+ PotentialCreator propsCtor = creators .propertiesBased ;
724
+ if (propsCtor == null ) {
725
725
_creatorProperties = Collections .emptyList ();
726
726
} else {
727
727
_creatorProperties = new ArrayList <>();
728
- _addCreatorParams (props , primary , _creatorProperties );
728
+ _addCreatorParams (props , propsCtor , _creatorProperties );
729
729
}
730
730
}
731
731
0 commit comments