Skip to content

Commit

Permalink
simplify uri check
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
  • Loading branch information
jimtng committed Mar 28, 2023
1 parent d63c4b0 commit 7206c5d
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,7 @@ public Collection<ConfigDescription> getConfigDescriptions(@Nullable Locale loca

@Override
public @Nullable ConfigDescription getConfigDescription(URI uri, @Nullable Locale locale) {
String uriString = uri.toString();
if (!uriString.startsWith(PROFILE_CONFIG_URI_PREFIX)) {
return null;
}
String transformationId = uriString.substring(PROFILE_CONFIG_URI_PREFIX.length());
if (!transformationId.equals(scriptType.toUpperCase())) {
if (!uri.toString().equals(PROFILE_CONFIG_URI_PREFIX + scriptType.toUpperCase())) {
return null;
}

Expand Down

0 comments on commit 7206c5d

Please sign in to comment.