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

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit e73ba38eaf4388020bff8fb1303c7c967dae5a64
Author: Robert Lazarski <[email protected]>
AuthorDate: Tue Jun 9 15:35:44 2026 -1000

    RAMPART-371: cover the null-QName assertion case in RahasModuleTest
    
    Follow-up to the Gemini review: Rahas.canSupportAssertion guards against an
    assertion whose getName() is null, but the tests only covered a null 
assertion.
    Add the null-QName case so the null-safety checks are fully exercised.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
---
 .../rampart-trust/src/test/java/org/apache/rahas/RahasModuleTest.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/modules/rampart-trust/src/test/java/org/apache/rahas/RahasModuleTest.java 
b/modules/rampart-trust/src/test/java/org/apache/rahas/RahasModuleTest.java
index d4c4fcb5..af6b12d6 100644
--- a/modules/rampart-trust/src/test/java/org/apache/rahas/RahasModuleTest.java
+++ b/modules/rampart-trust/src/test/java/org/apache/rahas/RahasModuleTest.java
@@ -55,5 +55,7 @@ public class RahasModuleTest extends TestCase {
                         new QName("http://example.com/unknown";, "Foo"))));
         assertFalse("null assertion must not be supported",
                 rahas.canSupportAssertion(null));
+        assertFalse("assertion with a null QName must not be supported",
+                rahas.canSupportAssertion(new PrimitiveAssertion(null)));
     }
 }

Reply via email to