Skip to content

Questionable condition to getUnAliasedPwd #25764

@pzygielo

Description

@pzygielo

I'm not sure what and when is returned from

public static String getUnAliasedPwd(String alias) {
try {
String unalisedPwd = RelativePathResolver.getRealPasswordFromAlias(alias);
if (unalisedPwd != null && "".equals(unalisedPwd)) {
return unalisedPwd;
}
} catch (Exception e) {
}
return alias;
}

Is it unalisedPwd when it's not null and empty? Strange.

Originally it said

            if (unalisedPwd != null && "".equals(unalisedPwd));
               return unalisedPwd;

(with misleading indentation, but when condition was met then nothing happened and unalisedPwd was returned) which was then "corrected" with javaee/glassfish@12e76af.

Given it "worked" for 15 years, it's uncertain for me if this shall be modified, ignored or removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions