Remove redundant logic for uninstalling Tomcat's URL stream handler factory
Closes gh-8622
This commit is contained in:
@@ -16,13 +16,8 @@
|
||||
|
||||
package org.springframework.boot.context.embedded;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import org.apache.catalina.Context;
|
||||
import org.apache.catalina.webresources.TomcatURLStreamHandlerFactory;
|
||||
import org.apache.tomcat.util.http.LegacyCookieProcessor;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
@@ -33,7 +28,6 @@ import org.springframework.boot.web.server.WebServerFactoryCustomizerBeanPostPro
|
||||
import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -44,14 +38,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class TomcatLegacyCookieProcessorExampleTests {
|
||||
|
||||
@BeforeClass
|
||||
@AfterClass
|
||||
public static void uninstallUrlStreamHandlerFactory() {
|
||||
ReflectionTestUtils.setField(TomcatURLStreamHandlerFactory.class, "instance",
|
||||
null);
|
||||
ReflectionTestUtils.setField(URL.class, "factory", null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cookieProcessorIsCustomized() {
|
||||
ServletWebServerApplicationContext applicationContext = (ServletWebServerApplicationContext) new SpringApplication(
|
||||
|
||||
Reference in New Issue
Block a user