Skip to content

Commit

Permalink
WW-5406 Revert breaking API change
Browse files Browse the repository at this point in the history
  • Loading branch information
kusalk committed Apr 10, 2024
1 parent 1a6e2fe commit ed0c728
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.regex.Pattern;

/**
* Contains preparation operations for a request before execution
Expand Down Expand Up @@ -228,6 +230,18 @@ public boolean isUrlExcluded(HttpServletRequest request) {
return dispatcher.getActionExcludedPatterns().stream().anyMatch(pattern -> pattern.matcher(uri).matches());
}

/**
* @deprecated since 6.4.0, use {@link #isUrlExcluded(HttpServletRequest)} instead.
*/
@Deprecated
public boolean isUrlExcluded(HttpServletRequest request, List<Pattern> excludedPatterns) {
if (excludedPatterns == null) {
return false;
}
String uri = RequestUtils.getUri(request);
return excludedPatterns.stream().anyMatch(pattern -> pattern.matcher(uri).matches());
}

/**
* Set an override of the static devMode value. Do not set this via a
* request parameter or any other unprotected method. Using a signed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class StrutsPrepareAndExecuteFilter implements StrutsStatics, Filter {

/**
* @deprecated since 6.4.0, use {@link Dispatcher#getActionExcludedPatterns} or
* {@link PrepareOperations#isUrlExcluded} instead.
* {@link PrepareOperations#isUrlExcluded(HttpServletRequest)} instead.
*/
@Deprecated
protected List<Pattern> excludedPatterns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class StrutsPrepareFilter implements StrutsStatics, Filter {

/**
* @deprecated since 6.4.0, use {@link Dispatcher#getActionExcludedPatterns} or
* {@link PrepareOperations#isUrlExcluded} instead.
* {@link PrepareOperations#isUrlExcluded(HttpServletRequest)} instead.
*/
@Deprecated
protected List<Pattern> excludedPatterns;
Expand Down

0 comments on commit ed0c728

Please sign in to comment.