labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r748615 - /labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java
Date Fri, 27 Feb 2009 17:44:12 GMT
Author: simoneg
Date: Fri Feb 27 17:44:11 2009
New Revision: 748615

URL: http://svn.apache.org/viewvc?rev=748615&view=rev
Log:
Fix SOOB error

Modified:
    labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java

Modified: labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java?rev=748615&r1=748614&r2=748615&view=diff
==============================================================================
--- labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java
(original)
+++ labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java
Fri Feb 27 17:44:11 2009
@@ -22,12 +22,12 @@
 		if (urlSegmentComputed) return urlSegment;
 		urlSegment = null;
 		StringBuilder sb = new StringBuilder(getMethod().getName());
-		if (sb.subSequence(0, 6).equals("hidden")) {
+		if (sb.length() > 6 && sb.subSequence(0, 6).equals("hidden")) {
 			urlSegmentComputed = true;
 		}
-		if (sb.subSequence(0, 6).equals("handle")) {
+		if (sb.length() > 6 && sb.subSequence(0, 6).equals("handle")) {
 			sb.delete(0, 6);
-		} else if (sb.subSequence(0, 2).equals("do")) {
+		} else if (sb.length() > 2 && sb.subSequence(0, 2).equals("do")) {
 			sb.delete(0, 2);
 		}
 		sb.setCharAt(0, Character.toLowerCase(sb.charAt(0)));



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message