[jbossws-commits] JBossWS SVN: r13032 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Sep 27 13:01:51 EDT 2010


Author: alessio.soldano at jboss.com
Date: 2010-09-27 13:01:51 -0400 (Mon, 27 Sep 2010)
New Revision: 13032

Modified:
   stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
Log:
[JBWS-3088] Prevent index out of bound exception when looking for relatesTo's type


Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java	2010-09-27 14:11:04 UTC (rev 13031)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/extensions/addressing/map/CXFMAP.java	2010-09-27 17:01:51 UTC (rev 13032)
@@ -110,10 +110,19 @@
       if (relatesTo != null)
       {
          String type = relatesTo.getRelationshipType();
+         QName relatesToType;
          int index = type.indexOf("}");
-         String ns = type.substring(1, index + 1);
-         String name = type.substring(index + 1);
-         return builder.newRelatesTo(relatesTo.getValue(), new QName(ns, name));
+         if (index == -1)
+         {
+            relatesToType = new QName(type);
+         }
+         else
+         {
+            String ns = type.substring(1, index + 1);
+            String name = type.substring(index + 1);
+            relatesToType = new QName(ns, name);
+         }
+         return builder.newRelatesTo(relatesTo.getValue(), relatesToType);
       }
       else
       {



More information about the jbossws-commits mailing list