Skip to content

Commit

Permalink
MInor straightening of alias access
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 24, 2024
1 parent 9fb9d56 commit 3d661fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -576,18 +576,15 @@ protected void _fixAccess(Collection<SettableBeanProperty> mainProps)
protected Map<String,List<PropertyName>> _collectAliases(Collection<SettableBeanProperty> props)
{
Map<String,List<PropertyName>> mapping = null;
AnnotationIntrospector intr = _config.getAnnotationIntrospector();
if (intr != null) {
for (SettableBeanProperty prop : props) {
List<PropertyName> aliases = intr.findPropertyAliases(prop.getMember());
if ((aliases == null) || aliases.isEmpty()) {
continue;
}
if (mapping == null) {
mapping = new HashMap<>();
}
mapping.put(prop.getName(), aliases);
for (SettableBeanProperty prop : props) {
List<PropertyName> aliases = prop.findAliases(_config);
if ((aliases == null) || aliases.isEmpty()) {
continue;
}
if (mapping == null) {
mapping = new HashMap<>();
}
mapping.put(prop.getName(), aliases);
}
if (mapping == null) {
return Collections.emptyMap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* serialization and deserialization purposes.
* These instances are created before actual {@link BeanProperty}
* instances are created, i.e. they are used earlier in the process
* flow, and are typically use to construct actual
* flow, and are typically used to construct actual
* {@link BeanProperty} instances.
*/
public abstract class BeanPropertyDefinition
Expand Down

0 comments on commit 3d661fc

Please sign in to comment.