jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r370781 - /incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DavLocatorFactoryImpl.java
Date Fri, 20 Jan 2006 10:49:40 GMT
Author: angela
Date: Fri Jan 20 02:49:37 2006
New Revision: 370781

URL: http://svn.apache.org/viewcvs?rev=370781&view=rev
Log:
avoid StringIndexOutOfBoundsException in case of invalid resource path.

Modified:
    incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DavLocatorFactoryImpl.java

Modified: incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DavLocatorFactoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DavLocatorFactoryImpl.java?rev=370781&r1=370780&r2=370781&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DavLocatorFactoryImpl.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/DavLocatorFactoryImpl.java
Fri Jan 20 02:49:37 2006
@@ -168,7 +168,8 @@
             if (resourcePath != null) {
                 buf.append(Text.escapePath(resourcePath));
             }
-            if (buf.charAt(buf.length() - 1) != '/') {
+            int length = buf.length();
+            if (length > 0 && buf.charAt(length - 1) != '/') {
                 buf.append("/");
             }
             href = buf.toString();



Mime
View raw message