Skip to content

Commit dfe37fb

Browse files
committed
use 1.8 api
1 parent b9c3f78 commit dfe37fb

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/test/java/io/github/pixee/security/UrlsTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
package io.github.pixee.security;
22

3-
import static io.github.pixee.security.J8ApiBridge.setOf;
4-
import static org.hamcrest.MatcherAssert.assertThat;
5-
import static org.hamcrest.Matchers.*;
6-
import static org.junit.jupiter.api.Assertions.assertThrows;
3+
import org.junit.jupiter.api.Test;
4+
import org.junit.jupiter.params.ParameterizedTest;
5+
import org.junit.jupiter.params.provider.Arguments;
6+
import org.junit.jupiter.params.provider.MethodSource;
77

88
import java.net.MalformedURLException;
99
import java.net.URL;
10-
import java.util.List;
1110
import java.util.regex.Pattern;
1211
import java.util.stream.Stream;
13-
import org.junit.jupiter.api.Test;
14-
import org.junit.jupiter.params.ParameterizedTest;
15-
import org.junit.jupiter.params.provider.Arguments;
16-
import org.junit.jupiter.params.provider.MethodSource;
12+
13+
import static io.github.pixee.security.J8ApiBridge.setOf;
14+
import static org.hamcrest.MatcherAssert.assertThat;
15+
import static org.hamcrest.Matchers.*;
16+
import static org.junit.jupiter.api.Assertions.assertThrows;
1717

1818
final class UrlsTest {
1919

@@ -146,7 +146,7 @@ void it_disallows_bad_domains() throws MalformedURLException {
146146
Urls.create("https://different-sub-123.good.com/", setOf(UrlProtocol.HTTPS), allowsOnlyGoodDotComByDomainString);
147147
Urls.create("https://.good.com/", setOf(UrlProtocol.HTTPS), allowsOnlyGoodDotComByDomainString);
148148

149-
List.of("https://goodAcom/", "https://evil.com", "https://good.com.evil", "https://good.com.").stream().forEach(badDomain -> {
149+
Stream.of("https://goodAcom/", "https://evil.com", "https://good.com.evil", "https://good.com.").forEach(badDomain -> {
150150
assertThrows(
151151
SecurityException.class,
152152
() -> {

0 commit comments

Comments
 (0)