Skip to content

Commit 93d1c7f

Browse files
committed
Fix JDK 10+
Issue gh-7265
1 parent 2c128e8 commit 93d1c7f

5 files changed

+10
-2
lines changed

test/src/test/java/org/springframework/security/test/web/servlet/request/SecurityMockMvcRequestPostProcessorsAuthenticationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
@RunWith(PowerMockRunner.class)
4646
@PrepareOnlyThisForTest(WebTestUtils.class)
47-
@PowerMockIgnore("javax.security.auth.*")
47+
@PowerMockIgnore({"javax.security.auth.*", "org.w3c.dom.*", "org.xml.sax.*", "org.apache.xerces.*", "javax.xml.parsers.*"})
4848
public class SecurityMockMvcRequestPostProcessorsAuthenticationTests {
4949
@Captor
5050
private ArgumentCaptor<SecurityContext> contextCaptor;

test/src/test/java/org/springframework/security/test/web/servlet/request/SecurityMockMvcRequestPostProcessorsSecurityContextTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.mockito.ArgumentCaptor;
3333
import org.mockito.Captor;
3434
import org.mockito.Mock;
35+
import org.powermock.core.classloader.annotations.PowerMockIgnore;
3536
import org.powermock.core.classloader.annotations.PrepareOnlyThisForTest;
3637
import org.powermock.modules.junit4.PowerMockRunner;
3738
import org.springframework.mock.web.MockHttpServletRequest;
@@ -42,6 +43,7 @@
4243

4344
@RunWith(PowerMockRunner.class)
4445
@PrepareOnlyThisForTest(WebTestUtils.class)
46+
@PowerMockIgnore({"javax.security.auth.*", "org.w3c.dom.*", "org.xml.sax.*", "org.apache.xerces.*", "javax.xml.parsers.*"})
4547
public class SecurityMockMvcRequestPostProcessorsSecurityContextTests {
4648
@Captor
4749
private ArgumentCaptor<SecurityContext> contextCaptor;

test/src/test/java/org/springframework/security/test/web/servlet/request/SecurityMockMvcRequestPostProcessorsTestSecurityContextTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.junit.Test;
3030
import org.junit.runner.RunWith;
3131
import org.mockito.Mock;
32+
import org.powermock.core.classloader.annotations.PowerMockIgnore;
3233
import org.powermock.core.classloader.annotations.PrepareOnlyThisForTest;
3334
import org.powermock.modules.junit4.PowerMockRunner;
3435
import org.springframework.mock.web.MockHttpServletRequest;
@@ -39,6 +40,7 @@
3940

4041
@RunWith(PowerMockRunner.class)
4142
@PrepareOnlyThisForTest(WebTestUtils.class)
43+
@PowerMockIgnore({"javax.security.auth.*", "org.w3c.dom.*", "org.xml.sax.*", "org.apache.xerces.*", "javax.xml.parsers.*"})
4244
public class SecurityMockMvcRequestPostProcessorsTestSecurityContextTests {
4345
@Mock
4446
private SecurityContext context;
@@ -81,4 +83,4 @@ private void mockWebTestUtils() {
8183
spy(WebTestUtils.class);
8284
when(WebTestUtils.getSecurityContextRepository(request)).thenReturn(repository);
8385
}
84-
}
86+
}

test/src/test/java/org/springframework/security/test/web/servlet/request/SecurityMockMvcRequestPostProcessorsUserDetailsTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.mockito.ArgumentCaptor;
3333
import org.mockito.Captor;
3434
import org.mockito.Mock;
35+
import org.powermock.core.classloader.annotations.PowerMockIgnore;
3536
import org.powermock.core.classloader.annotations.PrepareOnlyThisForTest;
3637
import org.powermock.modules.junit4.PowerMockRunner;
3738
import org.springframework.mock.web.MockHttpServletRequest;
@@ -44,6 +45,7 @@
4445

4546
@RunWith(PowerMockRunner.class)
4647
@PrepareOnlyThisForTest(WebTestUtils.class)
48+
@PowerMockIgnore({"javax.security.auth.*", "org.w3c.dom.*", "org.xml.sax.*", "org.apache.xerces.*", "javax.xml.parsers.*"})
4749
public class SecurityMockMvcRequestPostProcessorsUserDetailsTests {
4850
@Captor
4951
private ArgumentCaptor<SecurityContext> contextCaptor;

test/src/test/java/org/springframework/security/test/web/servlet/request/SecurityMockMvcRequestPostProcessorsUserTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.mockito.ArgumentCaptor;
3636
import org.mockito.Captor;
3737
import org.mockito.Mock;
38+
import org.powermock.core.classloader.annotations.PowerMockIgnore;
3839
import org.powermock.core.classloader.annotations.PrepareOnlyThisForTest;
3940
import org.powermock.modules.junit4.PowerMockRunner;
4041
import org.springframework.mock.web.MockHttpServletRequest;
@@ -47,6 +48,7 @@
4748

4849
@RunWith(PowerMockRunner.class)
4950
@PrepareOnlyThisForTest(WebTestUtils.class)
51+
@PowerMockIgnore({"javax.security.auth.*", "org.w3c.dom.*", "org.xml.sax.*", "org.apache.xerces.*", "javax.xml.parsers.*"})
5052
public class SecurityMockMvcRequestPostProcessorsUserTests {
5153
@Captor
5254
private ArgumentCaptor<SecurityContext> contextCaptor;

0 commit comments

Comments
 (0)