This is an automated email from the ASF dual-hosted git repository.

zrlw pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.3 by this push:
     new 8031aaa050 Add jre range annotation to oauth2 test cases which need 
jdk17+ (#15485)
8031aaa050 is described below

commit 8031aaa0504f7314525cb71b19a63d64348fa7cf
Author: zrlw <[email protected]>
AuthorDate: Wed Jun 25 03:04:20 2025 +0800

    Add jre range annotation to oauth2 test cases which need jdk17+ (#15485)
---
 .../dubbo/spring/security/jackson/ObjectMapperCodecTest.java       | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-plugin/dubbo-spring-security/src/test/java/org/apache/dubbo/spring/security/jackson/ObjectMapperCodecTest.java
 
b/dubbo-plugin/dubbo-spring-security/src/test/java/org/apache/dubbo/spring/security/jackson/ObjectMapperCodecTest.java
index 96b93bc4ed..780a7add65 100644
--- 
a/dubbo-plugin/dubbo-spring-security/src/test/java/org/apache/dubbo/spring/security/jackson/ObjectMapperCodecTest.java
+++ 
b/dubbo-plugin/dubbo-spring-security/src/test/java/org/apache/dubbo/spring/security/jackson/ObjectMapperCodecTest.java
@@ -22,6 +22,8 @@ import java.util.Collections;
 
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledForJreRange;
+import org.junit.jupiter.api.condition.JRE;
 import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.oauth2.client.OAuth2AuthorizedClient;
 import 
org.springframework.security.oauth2.client.registration.ClientRegistration;
@@ -39,7 +41,7 @@ import 
org.springframework.security.oauth2.server.resource.authentication.Bearer
 
 public class ObjectMapperCodecTest {
 
-    private ObjectMapperCodec mapper = new ObjectMapperCodec();
+    private final ObjectMapperCodec mapper = new ObjectMapperCodec();
 
     @Test
     public void testOAuth2AuthorizedClientCodec() {
@@ -54,6 +56,7 @@ public class ObjectMapperCodecTest {
         Assertions.assertNotNull(deserialize);
     }
 
+    @EnabledForJreRange(min = JRE.JAVA_17)
     @Test
     public void bearerTokenAuthenticationTest() {
         BearerTokenAuthentication bearerTokenAuthentication = new 
BearerTokenAuthentication(
@@ -70,6 +73,7 @@ public class ObjectMapperCodecTest {
         Assertions.assertNotNull(deserialize);
     }
 
+    @EnabledForJreRange(min = JRE.JAVA_17)
     @Test
     public void oAuth2ClientAuthenticationTokenTest() {
         OAuth2ClientAuthenticationToken oAuth2ClientAuthenticationToken = new 
OAuth2ClientAuthenticationToken(
@@ -83,6 +87,7 @@ public class ObjectMapperCodecTest {
         Assertions.assertNotNull(deserialize);
     }
 
+    @EnabledForJreRange(min = JRE.JAVA_17)
     @Test
     public void registeredClientTest() {
         RegisteredClient registeredClient = RegisteredClient.withId("id")

Reply via email to