Skip to content

DictionaryImpl does not provide original AVP type for AvpRepresentation #51

@raidan2

Description

@raidan2

Looking at org.jdiameter.common.impl.validation.DictionaryImpl you may find it's impossible to get original AVP type from dictionary with

        // UTF8String and Time are special situations, we don't want to convert these.
        if (typeParent == null || typeParent.equals("") || typeName.equals("UTF8String") || typeName.equals("Time")) {
          typeParent = typeName;
        }

and

            avpType = avpDefnChildElement.getAttribute("type-name");
            //FIXME: baranowb: why this is like that? This changes type of AVP to primitive ONE..? Checks against type dont make sense, ie to check for Address type...
            avpType = typedefMap.get(avpType);

As a result I cannot convert AVP into different format because I don't have type of this AVP (like it's an Address?).

May I suggest adding String getOriginalType(); to org.jdiameter.api.validation.AvpRepresentation so anyone who interested in original type could get it?

Enums are also not included into AvpRepresentation. Shouldn't we add it?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions