Rename registerResourceIfNecessary to registerResource
This commit renames registerResourceIfNecessary() to registerResource() and throws an exception if the class path resource does not exist. Closes gh-29083
This commit is contained in:
@@ -100,7 +100,7 @@ class StandardTestRuntimeHints implements TestRuntimeHintsRegistrar {
|
||||
Arrays.stream(paths)
|
||||
.filter(path -> path.startsWith(CLASSPATH_URL_PREFIX))
|
||||
.map(resourceLoader::getResource)
|
||||
.forEach(runtimeHints.resources()::registerResourceIfNecessary);
|
||||
.forEach(runtimeHints.resources()::registerResource);
|
||||
}
|
||||
|
||||
private void registerClasspathResourceDirectoryStructure(String directory, RuntimeHints runtimeHints) {
|
||||
|
||||
@@ -396,7 +396,7 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
|
||||
Arrays.stream(paths)
|
||||
.filter(path -> path.startsWith(CLASSPATH_URL_PREFIX))
|
||||
.map(resourceLoader::getResource)
|
||||
.forEach(runtimeHints.resources()::registerResourceIfNecessary);
|
||||
.forEach(runtimeHints.resources()::registerResource);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user