Skip to content

Commit 2de478e

Browse files
committed
remove unused
1 parent 98f082e commit 2de478e

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

playwright/src/test/java/com/microsoft/playwright/TestPageInterception.java

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
import com.microsoft.playwright.impl.PlaywrightImpl;
2222

23-
import java.io.OutputStreamWriter;
24-
import java.io.Writer;
2523
import java.util.HashMap;
2624
import java.util.concurrent.ExecutionException;
2725
import java.util.concurrent.Future;
@@ -210,25 +208,16 @@ Pattern globToRegex(String glob, String baseURL, boolean webSocketUrl) {
210208
return ((PlaywrightImpl) playwright).localUtils().globToRegex(glob, baseURL, webSocketUrl);
211209
}
212210

213-
boolean urlMatches(String baseURL, String urlString, Object match) {
214-
return urlMatches(baseURL, urlString, match, false);
215-
}
216-
217-
boolean urlMatches(String baseURL, String urlString, Object match, boolean webSocketUrl) {
211+
boolean urlMatches(String baseURL, String urlString, String match) {
218212
if (match == null) {
219213
return true;
220214
}
221215

222-
if (match instanceof String) {
223-
String glob = (String) match;
224-
if (glob.isEmpty()) {
225-
return true;
226-
}
227-
228-
match = globToRegex(glob, baseURL, webSocketUrl);
216+
String glob = (String) match;
217+
if (glob.isEmpty()) {
218+
return true;
229219
}
230220

231-
Pattern pattern = (Pattern) match;
232-
return pattern.matcher(urlString).find();
221+
return globToRegex(glob, baseURL, false).matcher(urlString).find();
233222
}
234223
}

0 commit comments

Comments
 (0)