Skip to content

Commit 8874fee

Browse files
committed
refactor builder helper methods
1 parent 084ce82 commit 8874fee

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

concurrency-limits-servlet-jakarta/src/main/java/com/netflix/concurrency/limits/servlet/jakarta/ServletLimiterBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ public ServletLimiterBuilder bypassLimitByParameter(String name, String value) {
110110
}
111111

112112
/**
113-
* Bypass limit if the request URI matches the specified URI.
114-
* @param uri The URI to check against the {@link HttpServletRequest } URI.
115-
* If the request's URI matches this URI, the limit will be bypassed.
113+
* Bypass limit if the request path info matches the specified path.
114+
* @param pathInfo The path info to check against the {@link HttpServletRequest } pathInfo.
115+
* If the request's pathInfo matches this, the limit will be bypassed.
116116
* @return Chainable builder
117117
*/
118-
public ServletLimiterBuilder bypassLimitByRequestUri(String uri) {
119-
return bypassLimitResolver((context) -> uri.equals(context.getRequestURI()));
118+
public ServletLimiterBuilder bypassLimitByPathInfo(String pathInfo) {
119+
return bypassLimitResolver((context) -> pathInfo.equals(context.getPathInfo()));
120120
}
121121

122122
/**

concurrency-limits-servlet/src/main/java/com/netflix/concurrency/limits/servlet/ServletLimiterBuilder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ public ServletLimiterBuilder bypassLimitByParameter(String name, String value) {
110110
}
111111

112112
/**
113-
* Bypass limit if the request URI matches the specified URI.
114-
* @param uri The URI to check against the {@link HttpServletRequest } URI.
115-
* If the request's URI matches this URI, the limit will be bypassed.
113+
* Bypass limit if the request path info matches the specified path.
114+
* @param pathInfo The path info to check against the {@link HttpServletRequest } pathInfo.
115+
* If the request's pathInfo matches this, the limit will be bypassed.
116116
* @return Chainable builder
117117
*/
118-
public ServletLimiterBuilder bypassLimitByRequestUri(String uri) {
119-
return bypassLimitResolver((context) -> uri.equals(context.getRequestURI()));
118+
public ServletLimiterBuilder bypassLimitByPathInfo(String pathInfo) {
119+
return bypassLimitResolver((context) -> pathInfo.equals(context.getPathInfo()));
120120
}
121121

122122
/**

0 commit comments

Comments
 (0)