tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36336] New: - java.lang.StringIndexOutOfBoundsException: String index out of range: -1
Date Wed, 24 Aug 2005 12:35:30 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36336>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36336

           Summary: java.lang.StringIndexOutOfBoundsException: String index
                    out of range: -1
           Product: Tomcat 5
           Version: 5.5.9
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Webapps:Manager
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: a.grasoff@fpestde.net


Hi,

When I deploy (/manager) some web-application with extension .WAR (uppercase)
then I see:

SEVERE: HTMLManager: FAIL - Deploy Upload Failed, Exception: String index out of
range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(Unknown Source)
	at
org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:194)

In source of HTMLManagerServlet:

194: basename = war.substring(0, war.indexOf(".war")); // no lowerCase

BUT:

180: if (!war.toLowerCase().endsWith(".war")) // lowerCase

---
May be is better make so:

194: basename = war.substring(0, war.toLowerCase().indexOf(".war"));

Thanks.

Anton.

PS I am sorry for my English :)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message