StringIndexOutOfBoundsException in org.jruby.util.JavaNameMangler
-----------------------------------------------------------------

                 Key: JRUBY-4681
                 URL: http://jira.codehaus.org/browse/JRUBY-4681
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.4
         Environment: WinXP, J2SE 1.6
            Reporter: Marek Sajna
            Priority: Minor


I'm getting StringIndexOutOfBoundsException: -3 while running Rails 2.3.2, but 
I was unable to track down when, it happens randomly while request is handled 
by Mongrel.
I guess that line 39 of org.jruby.util.JavaNameMangler contains typo, or is "6" 
as beginIndex appropriate? Looks like there's "!" at index 3 of the String and 
that causes the error. I'm unable think of another explanation, not even to 
find something on the issue on google.

{code:Java}
38: if(filename.indexOf("!") != -1) {
39:                String before = filename.substring(6, filename.indexOf("!"));
{code}

{noformat}
java.lang.StringIndexOutOfBoundsException: String index out of range: -3
        at java.lang.String.substring(String.java:1938)
        at 
org.jruby.util.JavaNameMangler.mangleFilenameForClasspath(JavaNameMangler.java:39)
        at 
org.jruby.util.JavaNameMangler.mangleFilenameForClasspath(JavaNameMangler.java:32)
        at 
org.jruby.util.JavaNameMangler.mangleFilenameForClasspath(JavaNameMangler.java:28)
        at 
org.jruby.compiler.JITCompiler$JITClassGenerator.<init>(JITCompiler.java:174)
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to