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-core.git

commit c63587a5c42489609ec102ed54d1c4441271b222
Author: Robert Lazarski <[email protected]>
AuthorDate: Sat Apr 11 10:59:16 2026 -1000

    AXIS2-6102 Apply Gemini review: null safety, remove woden dep block
    
    - URLTemplatingUtil.applyURITemplating: add null guards for
      messageContext, envelope, body, firstElement (HIGH — prevents NPE)
    - kernel pom.xml: remove woden-core dependency block entirely
      (was optional, but all code deleted — no reason to keep it)
    - CodeGenConfiguration: use String constructor for
      CodeGenerationException instead of wrapping Exception
    - CodeGenConfiguration: remove stale WSDL20 imports
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 .../src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java     | 4 +---
 modules/kernel/pom.xml                                              | 6 +-----
 .../src/org/apache/axis2/kernel/http/util/URLTemplatingUtil.java    | 5 +++++
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git 
a/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java 
b/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
index 1f7ed9b18d..b824977971 100644
--- 
a/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
+++ 
b/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
@@ -23,8 +23,6 @@ import org.apache.axis2.AxisFault;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder;
 import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
-import org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder;
-import org.apache.axis2.description.WSDL20ToAxisServiceBuilder;
 import org.apache.axis2.util.CommandLineOptionConstants;
 import org.apache.axis2.util.URLProcessor;
 import org.apache.axis2.wsdl.WSDLUtil;
@@ -682,7 +680,7 @@ public class CodeGenConfiguration implements 
CommandLineOptionConstants {
                     equals(getWSDLVersion())) {
                 // WSDL 2.0 codegen removed in 2.0.1 (AXIS2-6102)
                 throw new CodeGenerationException(
-                        new Exception("WSDL 2.0 code generation is no longer 
supported. Use WSDL 1.1."));
+                        "WSDL 2.0 code generation is no longer supported. Use 
WSDL 1.1.");
             } else {
                 //It'll be WSDL 1.1
                 Definition wsdl4jDef = readInTheWSDLFile(wsdlUri);
diff --git a/modules/kernel/pom.xml b/modules/kernel/pom.xml
index 22cd35bd6d..ebfc1f5968 100644
--- a/modules/kernel/pom.xml
+++ b/modules/kernel/pom.xml
@@ -85,11 +85,7 @@
             <groupId>org.apache.neethi</groupId>
             <artifactId>neethi</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.apache.woden</groupId>
-            <artifactId>woden-core</artifactId>
-            <optional>true</optional>
-        </dependency>
+        <!-- woden-core removed in 2.0.1 (AXIS2-6102) — WSDL 2.0 no longer 
supported -->
         <dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>
diff --git 
a/modules/kernel/src/org/apache/axis2/kernel/http/util/URLTemplatingUtil.java 
b/modules/kernel/src/org/apache/axis2/kernel/http/util/URLTemplatingUtil.java
index 696d1dc846..0b47444650 100644
--- 
a/modules/kernel/src/org/apache/axis2/kernel/http/util/URLTemplatingUtil.java
+++ 
b/modules/kernel/src/org/apache/axis2/kernel/http/util/URLTemplatingUtil.java
@@ -168,6 +168,11 @@ public class URLTemplatingUtil {
      */
     private static String applyURITemplating(MessageContext messageContext, 
String rawURLString,
                                              boolean detach) throws AxisFault {
+        if (messageContext == null || messageContext.getEnvelope() == null
+                || messageContext.getEnvelope().getBody() == null
+                || messageContext.getEnvelope().getBody().getFirstElement() == 
null) {
+            return rawURLString;
+        }
         OMElement firstElement;
         if (detach) {
             firstElement = 
messageContext.getEnvelope().getBody().getFirstElement();

Reply via email to