@@ -435,14 +435,13 @@ protected void _addCreators()
435
435
for (int i = 0 , len = ctor .getParameterCount (); i < len ; ++i ) {
436
436
AnnotatedParameter param = ctor .getParameter (i );
437
437
PropertyName pn = ai .findNameForDeserialization (param );
438
- String name = (pn == null ) ? null : pn .getSimpleName ();
439
438
// is it legal not to have name?
440
- if (name != null && name . length () > 0 ) {
439
+ if (pn != null && ! pn . isEmpty () ) {
441
440
// shouldn't need to worry about @JsonIgnore (no real point, so)
442
- POJOPropertyBuilder prop = _property (name );
441
+ POJOPropertyBuilder prop = _property (pn );
443
442
// 28-Mar-2014, tatu: for now, all creator names considered explicit;
444
443
// may need to change for JDK 8 where implicit names exist
445
- prop .addCtor (param , name , true , true , false );
444
+ prop .addCtor (param , pn , true , true , false );
446
445
_creatorProperties .add (prop );
447
446
}
448
447
}
@@ -454,13 +453,12 @@ protected void _addCreators()
454
453
for (int i = 0 , len = factory .getParameterCount (); i < len ; ++i ) {
455
454
AnnotatedParameter param = factory .getParameter (i );
456
455
PropertyName pn = ai .findNameForDeserialization (param );
457
- String name = (pn == null ) ? null : pn .getSimpleName ();
458
456
// is it legal not to have name?
459
- if (name != null ) {
457
+ if (pn != null && ! pn . isEmpty () ) {
460
458
// shouldn't need to worry about @JsonIgnore (no real point, so)
461
- POJOPropertyBuilder prop = _property (name );
459
+ POJOPropertyBuilder prop = _property (pn );
462
460
// 28-Mar-2014, tatu: for now, all names considered explicit
463
- prop .addCtor (param , name , true , true , false );
461
+ prop .addCtor (param , pn , true , true , false );
464
462
_creatorProperties .add (prop );
465
463
}
466
464
}
@@ -824,7 +822,12 @@ protected void _renameWithWrappers()
824
822
protected void reportProblem (String msg ) {
825
823
throw new IllegalArgumentException ("Problem with definition of " +_classDef +": " +msg );
826
824
}
825
+
826
+ protected POJOPropertyBuilder _property (PropertyName name ) {
827
+ return _property (name .getSimpleName ());
828
+ }
827
829
830
+ // !!! TODO: deprecate, require use of PropertyName
828
831
protected POJOPropertyBuilder _property (String implName )
829
832
{
830
833
POJOPropertyBuilder prop = _properties .get (implName );
0 commit comments