Merge branch '2.0.x' into 2.1.x
Closes gh-17078
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,8 +32,7 @@ import static org.hamcrest.CoreMatchers.isA;
|
||||
@ClassPathExclusions("hibernate-validator-*.jar")
|
||||
public class ModifiedClassPathRunnerExclusionsTests {
|
||||
|
||||
private static final String EXCLUDED_RESOURCE = "META-INF/services/"
|
||||
+ "javax.validation.spi.ValidationProvider";
|
||||
private static final String EXCLUDED_RESOURCE = "META-INF/services/" + "javax.validation.spi.ValidationProvider";
|
||||
|
||||
@Test
|
||||
public void entriesAreFilteredFromTestClassClassLoader() {
|
||||
@@ -42,8 +41,7 @@ public class ModifiedClassPathRunnerExclusionsTests {
|
||||
|
||||
@Test
|
||||
public void entriesAreFilteredFromThreadContextClassLoader() {
|
||||
assertThat(Thread.currentThread().getContextClassLoader()
|
||||
.getResource(EXCLUDED_RESOURCE)).isNull();
|
||||
assertThat(Thread.currentThread().getContextClassLoader().getResource(EXCLUDED_RESOURCE)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,14 +35,14 @@ public class ModifiedClassPathRunnerOverridesTests {
|
||||
|
||||
@Test
|
||||
public void classesAreLoadedFromOverride() {
|
||||
assertThat(ApplicationContext.class.getProtectionDomain().getCodeSource()
|
||||
.getLocation().toString()).endsWith("spring-context-4.1.0.RELEASE.jar");
|
||||
assertThat(ApplicationContext.class.getProtectionDomain().getCodeSource().getLocation().toString())
|
||||
.endsWith("spring-context-4.1.0.RELEASE.jar");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void classesAreLoadedFromTransitiveDependencyOfOverride() {
|
||||
assertThat(StringUtils.class.getProtectionDomain().getCodeSource().getLocation()
|
||||
.toString()).endsWith("spring-core-4.1.0.RELEASE.jar");
|
||||
assertThat(StringUtils.class.getProtectionDomain().getCodeSource().getLocation().toString())
|
||||
.endsWith("spring-core-4.1.0.RELEASE.jar");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user