Skip to content

Commit fee3817

Browse files
committed
Revert "Test encoding and Unicode normalization for scanned resources"
This reverts commit eb2c1cb.
1 parent eb2c1cb commit fee3817

File tree

4 files changed

+0
-76
lines changed

4 files changed

+0
-76
lines changed

spring-core/src/test/java/example/japanese/バリューオブジェクト/バリューオブジェクト.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -105,30 +105,6 @@ void usingFilePrototol() {
105105

106106
}
107107

108-
@Nested
109-
class ContainingJapaneseCharactersInTheirPathsAndFileNames {
110-
111-
@Test
112-
void usingClasspathStarProtocol() {
113-
String pattern = "classpath*:example/japanese/バリューオブジェクト/**/*.class";
114-
String pathPrefix = ".+example/japanese/";
115-
116-
assertExactFilenames(pattern, "バリューオブジェクト.class");
117-
assertExactSubPaths(pattern, pathPrefix, "バリューオブジェクト/バリューオブジェクト.class");
118-
}
119-
120-
@Test
121-
void usingFilePrototol() {
122-
Path testResourcesDir = Paths.get("src/test/resources").toAbsolutePath();
123-
String pattern = String.format("file:%s/japanese-resources/バリューオブジェクト/**/*.text", testResourcesDir);
124-
String pathPrefix = ".+japanese-resources/";
125-
126-
assertExactFilenames(pattern, "バリューオブジェクト.text");
127-
assertExactSubPaths(pattern, pathPrefix, "バリューオブジェクト/バリューオブジェクト.text");
128-
}
129-
130-
}
131-
132108
}
133109

134110

@@ -205,27 +181,4 @@ private void assertFilenames(String pattern, boolean exactly, String... filename
205181
}
206182
}
207183

208-
private void assertExactSubPaths(String pattern, String pathPrefix, String... subPaths) {
209-
try {
210-
Resource[] resources = resolver.getResources(pattern);
211-
List<String> actualSubPaths = Arrays.stream(resources)
212-
.map(resource -> getPath(resource).replaceFirst(pathPrefix, ""))
213-
.sorted()
214-
.collect(Collectors.toList());
215-
assertThat(actualSubPaths).containsExactlyInAnyOrder(subPaths);
216-
}
217-
catch (IOException ex) {
218-
throw new UncheckedIOException(ex);
219-
}
220-
}
221-
222-
private String getPath(Resource resource) {
223-
try {
224-
return resource.getURL().getPath();
225-
}
226-
catch (IOException ex) {
227-
throw new UncheckedIOException(ex);
228-
}
229-
}
230-
231184
}

spring-core/src/test/resources/japanese-resources/バリューオブジェクト/バリューオブジェクト.text

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/checkstyle/checkstyle-suppressions.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
<suppress files="ResolvableType" checks="FinalClass"/>
3939
<suppress files="[\\/]src[\\/]testFixtures[\\/]java[\\/].+" checks="IllegalImport" id="bannedJUnitJupiterImports"/>
4040

41-
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]example[\\/]japanese[\\/].+" checks="TypeName" />
42-
4341
<!-- spring-expression -->
4442
<suppress files="ExpressionException" checks="MutableException"/>
4543
<suppress files="SpelMessage" checks="JavadocVariable|JavadocStyle"/>

0 commit comments

Comments
 (0)