Suppress warnings regarding deprecated JdkVersion

Issue: SPR-13312
master
Sam Brannen 9 years ago
parent 27e9db8c8c
commit acb44f9d46
  1. 4
      spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java

@ -25,7 +25,6 @@ import java.util.List;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.springframework.core.JdkVersion;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import static org.junit.Assert.*; import static org.junit.Assert.*;
@ -83,7 +82,8 @@ public class PathMatchingResourcePatternResolverTests {
public void testSingleResourceInJar() throws IOException { public void testSingleResourceInJar() throws IOException {
Resource[] resources = resolver.getResources("java/net/URL.class"); Resource[] resources = resolver.getResources("java/net/URL.class");
assertEquals(1, resources.length); assertEquals(1, resources.length);
String expectedProtocol = (JdkVersion.getMajorJavaVersion() < JdkVersion.JAVA_19 ? "jar" : "jrt"); @SuppressWarnings("deprecation")
String expectedProtocol = (org.springframework.core.JdkVersion.getMajorJavaVersion() < org.springframework.core.JdkVersion.JAVA_19 ? "jar" : "jrt");
assertProtocolAndFilename(resources[0], expectedProtocol, "URL.class"); assertProtocolAndFilename(resources[0], expectedProtocol, "URL.class");
} }

Loading…
Cancel
Save