[jbosstools-commits] JBoss Tools SVN: r39227 - branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Mar 1 10:35:19 EST 2012


Author: bfitzpat
Date: 2012-03-01 10:35:18 -0500 (Thu, 01 Mar 2012)
New Revision: 39227

Modified:
   branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SchemaUtils.java
Log:
[JBIDE-11122] Fix for index out of bounds error (already fixed in trunk)

Modified: branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SchemaUtils.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SchemaUtils.java	2012-03-01 12:40:56 UTC (rev 39226)
+++ branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.ui/src/org/jboss/tools/ws/ui/utils/SchemaUtils.java	2012-03-01 15:35:18 UTC (rev 39227)
@@ -988,7 +988,12 @@
 			}
 			if (element.getAttribute("type") != null) {//$NON-NLS-1$
 				elemType = element.getAttributeValue("type");//$NON-NLS-1$
-				String nsprefix = elemType.substring(0, elemType.indexOf(':'));
+				String nsprefix = ""; //$NON-NLS-1$
+				try {
+					nsprefix = elemType.substring(0, elemType.indexOf(':'));
+				} catch (StringIndexOutOfBoundsException e) {
+					// ignore
+				}
 				String testUri = getURIfromSchemaPrefix(element, nsprefix);
 				if (elemType.indexOf(':') > -1) {
 					if (!(elemType.startsWith("xs:") || elemType.startsWith("xsd:"))){ //$NON-NLS-1$ //$NON-NLS-2$



More information about the jbosstools-commits mailing list