Skip to content

Commit

Permalink
Improve normalization of profiled property (#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
radcortez authored Sep 21, 2023
1 parent d3a133e commit de53124
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ public String[] getProfiles() {
return profiles;
}

private String normalizeName(final String name) {
for (String profile : profiles) {
if (name.startsWith("%" + profile + ".")) {
return name.substring(profile.length() + 2);
public String normalizeName(final String name) {
if (name.length() > 0 && name.charAt(0) == '%') {
for (String profile : profiles) {
if (name.startsWith(profile + ".", 1)) {
return name.substring(profile.length() + 2);
}
}
}

return name;
}

Expand Down

0 comments on commit de53124

Please sign in to comment.