davsclaus commented on code in PR #27433:
URL: https://github.com/apache/camel/pull/27433#discussion_r4422230836


##########
core/camel-core/src/test/java/org/apache/camel/support/jsse/SSLContextParametersTest.java:
##########
@@ -1069,20 +1070,17 @@ public void testSignatureSchemesFilter_postJDK26() 
throws Exception {
 
         int defaultSignatureSchemeNumber = 
getSignatureSchemes(engine.getSSLParameters()).length;
 
-        // a filter cannot be applied as there are no default schemes to 
filter, so the defaults are kept (null)
-        // instead of an empty list (which would fail every handshake)
+        // empty filter - no includes means no schemes match (empty array)
         FilterParameters filter = new FilterParameters();
-        filter.getInclude().add(".*");
         scp.setSignatureSchemesFilter(filter);
         context = scp.createSSLContext(null);
         engine = context.createSSLEngine();
         socket = (SSLSocket) context.getSocketFactory().createSocket();
         serverSocket = (SSLServerSocket) 
context.getServerSocketFactory().createServerSocket();
 
-        assertNull(getSignatureSchemes(engine.getSSLParameters()));
-        assertNull(getSignatureSchemes(socket.getSSLParameters()));
-        assertNull(getSignatureSchemes(serverSocket.getSSLParameters()));
-        filter.getInclude().clear();
+        assertThat(getSignatureSchemes(engine.getSSLParameters())).isEmpty();
+        assertThat(getSignatureSchemes(socket.getSSLParameters())).isEmpty();
+        
assertThat(getSignatureSchemes(serverSocket.getSSLParameters())).isEmpty();

Review Comment:
   Applied in be522774d249.
   
   _Claude Code on behalf of davsclaus_



##########
core/camel-core/src/test/java/org/apache/camel/support/jsse/SSLContextParametersTest.java:
##########
@@ -36,6 +36,7 @@
 import org.junit.jupiter.api.condition.JRE;
 import org.junit.jupiter.api.parallel.Isolated;
 
+import static org.assertj.core.api.Assertions.assertThat;

Review Comment:
   Fixed in be522774d249: the empty-filter block is gone, so no AssertJ is left 
in this method and the import is removed. The class uses JUnit assertions only.
   
   _Claude Code on behalf of davsclaus_



##########
core/camel-core/src/test/java/org/apache/camel/support/jsse/SSLContextParametersTest.java:
##########
@@ -29,11 +29,13 @@
 import javax.net.ssl.SSLSocket;
 
 import org.apache.camel.CamelContext;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.EnabledForJreRange;
 import org.junit.jupiter.api.condition.JRE;
 import org.junit.jupiter.api.parallel.Isolated;
 
+import static org.assertj.core.api.Assertions.assertThat;

Review Comment:
   Fixed in be522774d249: the empty-filter block is gone, so no AssertJ is left 
in this method and the import is removed. The class uses JUnit assertions only.
   
   _Claude Code on behalf of davsclaus_



##########
core/camel-core/src/test/java/org/apache/camel/support/jsse/SSLContextParametersTest.java:
##########
@@ -1063,20 +1069,17 @@ public void testSignatureSchemesFilter_postJDK26() 
throws Exception {
 
         int defaultSignatureSchemeNumber = 
engine.getSSLParameters().getSignatureSchemes().length;
 
-        // a filter cannot be applied as there are no default schemes to 
filter, so the defaults are kept (null)
-        // instead of an empty list (which would fail every handshake)
+        // empty filter - no includes means no schemes match (empty array)
         FilterParameters filter = new FilterParameters();
-        filter.getInclude().add(".*");
         scp.setSignatureSchemesFilter(filter);
         context = scp.createSSLContext(null);
         engine = context.createSSLEngine();
         socket = (SSLSocket) context.getSocketFactory().createSocket();
         serverSocket = (SSLServerSocket) 
context.getServerSocketFactory().createServerSocket();
 
-        assertNull(engine.getSSLParameters().getSignatureSchemes());
-        assertNull(socket.getSSLParameters().getSignatureSchemes());
-        assertNull(serverSocket.getSSLParameters().getSignatureSchemes());
-        filter.getInclude().clear();
+        assertThat(engine.getSSLParameters().getSignatureSchemes()).isEmpty();
+        assertThat(socket.getSSLParameters().getSignatureSchemes()).isEmpty();
+        
assertThat(serverSocket.getSSLParameters().getSignatureSchemes()).isEmpty();

Review Comment:
   Fixed in be522774d249: the empty-filter block is gone, so no AssertJ is left 
in this method and the import is removed. The class uses JUnit assertions only.
   
   _Claude Code on behalf of davsclaus_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to