Skip to content

Wrong constant in error message in ResourceRef constructor #520

Description

@elharo

Description

In ResourceRef.java:74-75, the error message uses the wrong constant:

} else if ((type == null || type.isEmpty()) && (auth == null || auth.isEmpty())) {
    throw new IllegalArgumentException(RESOURCE_TYPE + " in " + RESOURCE_REF_NAME + " element cannot be null ");
}

RESOURCE_REF_NAME is "res-ref-name" but the message should refer to the "resource-ref" element. The correct constant would be RESOURCE_REF which is "resource-ref".

Expected behavior

Use RESOURCE_REF instead of RESOURCE_REF_NAME:

throw new IllegalArgumentException(RESOURCE_TYPE + " in " + RESOURCE_REF + " element cannot be null");

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions