Skip to content

Commit

Permalink
Make the variable static
Browse files Browse the repository at this point in the history
  • Loading branch information
hwupathum committed Dec 11, 2024
1 parent 3deb46d commit 16e1a3e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public class UAEPassAuthenticator extends AbstractApplicationAuthenticator

private static final Log LOG = LogFactory.getLog(UAEPassAuthenticator.class);
private static final String DYNAMIC_PARAMETER_LOOKUP_REGEX = "\\$\\{(\\w+)\\}";
private static final Pattern PATTERN = Pattern.compile(DYNAMIC_PARAMETER_LOOKUP_REGEX);

/**
* Checks whether the request and response can be handled by the authenticator.
Expand Down Expand Up @@ -662,8 +663,7 @@ protected String getLoginType(HttpServletRequest request) {
*/
private String replaceDynamicParams(String queryString, Map<String,String[]> parameters) {

Pattern pattern = Pattern.compile(DYNAMIC_PARAMETER_LOOKUP_REGEX);
Matcher matcher = pattern.matcher(queryString);
Matcher matcher = PATTERN.matcher(queryString);

while (matcher.find()) {
String name = matcher.group(1);
Expand Down

0 comments on commit 16e1a3e

Please sign in to comment.