Author: alessio.soldano(a)jboss.com
Date: 2010-03-12 13:37:54 -0500 (Fri, 12 Mar 2010)
New Revision: 11777
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
Log:
Prevent index out of bound exception
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2010-03-12
18:37:07 UTC (rev 11776)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2010-03-12
18:37:54 UTC (rev 11777)
@@ -111,6 +111,10 @@
private String lowerCaseProtocol(String targetAddress)
{
int colonIndex = targetAddress.indexOf(':');
+ if (colonIndex == -1)
+ {
+ return targetAddress;
+ }
String lowerCasedProtocol = targetAddress.substring(0, colonIndex).toLowerCase();
return lowerCasedProtocol + targetAddress.substring(colonIndex);
}
Show replies by date