Skip to content

Commit

Permalink
One more fix wrt #637
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Feb 4, 2024
1 parent 56a6823 commit 9f1aa0f
Showing 1 changed file with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,33 +197,29 @@ public Boolean isOutputAsCData(MapperConfig<?> config, Annotated ann) {
@Override
public PropertyName findNameForSerialization(Annotated a)
{
PropertyName name = _findXmlName(a);
if (name == null) {
name = super.findNameForSerialization(a);
if (name == null) {
if (_hasOneOf(a, ANNOTATIONS_TO_INFER_XML_PROP)) {
return PropertyName.USE_DEFAULT;
}
PropertyName pn = PropertyName.merge(_findXmlName(a),
super.findNameForSerialization(a));
if (pn == null) {
if (_hasOneOf(a, ANNOTATIONS_TO_INFER_XML_PROP)) {
return PropertyName.USE_DEFAULT;
}
}
return name;
return pn;
}

@Override
public PropertyName findNameForDeserialization(Annotated a)
{
PropertyName name = _findXmlName(a);
if (name == null) {
name = super.findNameForDeserialization(a);
if (name == null) {
if (_hasOneOf(a, ANNOTATIONS_TO_INFER_XML_PROP)) {
return PropertyName.USE_DEFAULT;
}
PropertyName pn = PropertyName.merge(_findXmlName(a),
super.findNameForDeserialization(a));
if (pn == null) {
if (_hasOneOf(a, ANNOTATIONS_TO_INFER_XML_PROP)) {
return PropertyName.USE_DEFAULT;
}
}
return name;
return pn;
}

/*
/**********************************************************************
/* Overrides for non-public helper methods
Expand Down

0 comments on commit 9f1aa0f

Please sign in to comment.