File tree Expand file tree Collapse file tree 5 files changed +15820
-5
lines changed
java/org/apache/hc/client5/http/psl
resources/org/publicsuffix/list Expand file tree Collapse file tree 5 files changed +15820
-5
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,8 @@ Copyright 1999-2023 The Apache Software Foundation
4
4
This product includes software developed at
5
5
The Apache Software Foundation (http://www.apache.org/).
6
6
7
+ This product includes a copy of in https://publicsuffix.org/list/effective_tld_names.dat
8
+ in httpclient5/src/test/resources/org/publicsuffix/list/effective_tld_names.dat
9
+ This Source Code Form is subject to the terms of the Mozilla Public
10
+ License, v. 2.0. If a copy of the MPL was not distributed with this
11
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
Original file line number Diff line number Diff line change 123
123
</goals >
124
124
<configuration >
125
125
<url >https://publicsuffix.org/list/effective_tld_names.dat</url >
126
- <outputDirectory >${project.build.outputDirectory} /mozilla </outputDirectory >
126
+ <outputDirectory >${project.build.outputDirectory} /src/test/resources/org/publicsuffix/list </outputDirectory >
127
127
<outputFileName >public-suffix-list.txt</outputFileName >
128
128
</configuration >
129
129
</execution >
Original file line number Diff line number Diff line change 40
40
class TestPublicSuffixMatcher {
41
41
42
42
private static final String SOURCE_FILE = "suffixlistmatcher.txt" ;
43
- private static final String PUBLIC_SUFFIX_LIST_FILE = "mozilla/public-suffix- list.txt " ;
43
+ private static final String PUBLIC_SUFFIX_LIST_FILE = "org/publicsuffix/ list/effective_tld_names.dat " ;
44
44
45
45
private PublicSuffixMatcher matcher ;
46
46
private PublicSuffixMatcher pslMatcher ;
47
47
48
+ /**
49
+ * Create a matcher using the public suffix list file provided by Mozilla.
50
+ *
51
+ * This test a copy of in https://publicsuffix.org/list/effective_tld_names.dat in
52
+ * httpclient5/src/test/resources/org/publicsuffix/list/effective_tld_names.dat
53
+ */
48
54
@ BeforeEach
49
55
void setUp () throws Exception {
50
56
final ClassLoader classLoader = getClass ().getClassLoader ();
@@ -54,9 +60,6 @@ void setUp() throws Exception {
54
60
final List <PublicSuffixList > lists = PublicSuffixListParser .INSTANCE .parseByType (new InputStreamReader (in , StandardCharsets .UTF_8 ));
55
61
matcher = new PublicSuffixMatcher (lists );
56
62
}
57
- // Create a matcher using the public suffix list file provided by Mozilla
58
- // Note: the test requires `mvn generate-resources` to have been called to fetch the Mozilla file into
59
- // target/classes so that it is on the classpath
60
63
final URL publicSuffixListUrl = classLoader .getResource (PUBLIC_SUFFIX_LIST_FILE );
61
64
pslMatcher = PublicSuffixMatcherLoader .load (publicSuffixListUrl );
62
65
}
You can’t perform that action at this time.
0 commit comments