commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (LANG-624) SystemUtils.getJavaVersionAsFloat throws StringIndexOutOfBoundsException on Android runtime/Dalvik VM
Date Fri, 28 May 2010 16:31:37 GMT

    [ https://issues.apache.org/jira/browse/LANG-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12873041#action_12873041
] 

Gary Gregory edited comment on LANG-624 at 5/28/10 12:31 PM:
-------------------------------------------------------------

I expect this assertion to fail:

{quote}
assertEquals(130, SystemUtils.toJavaVersionInt("XXX-1.3.x"), 0.000001f);
{quote}

You must mean:

{quote}
assertEquals(131, SystemUtils.toJavaVersionInt("XXX-1.3.x"), 0.000001f);
{quote}

I applied and changed the test patch above.

      was (Author: ggregory@seagullsw.com):
    I expect this assertion to fail:

{quote}
assertEquals(130, SystemUtils.toJavaVersionInt("XXX-1.3.x"), 0.000001f);
{quote}

You must mean:

{quote}
assertEquals(131, SystemUtils.toJavaVersionInt("XXX-1.3.x"), 0.000001f);
{quote}

  
> SystemUtils.getJavaVersionAsFloat throws StringIndexOutOfBoundsException on Android runtime/Dalvik
VM
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LANG-624
>                 URL: https://issues.apache.org/jira/browse/LANG-624
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 2.5, Nightly Builds
>            Reporter: Travis Truman
>             Fix For: 3.0, Nightly Builds
>
>
> Can be replicated in the Android emulator quite easily.
> Stack trace:
> {noformat}
> at org.apache.commons.lang.builder.ToStringBuilder.<clinit>(ToStringBuilder.java:98)
> E/AndroidRuntime( 1681): 	... 17 more
> E/AndroidRuntime( 1681): Caused by: java.lang.ExceptionInInitializerError
> E/AndroidRuntime( 1681): 	at org.apache.commons.lang.builder.ToStringStyle$MultiLineToStringStyle.<init>(ToStringStyle.java:2276)
> E/AndroidRuntime( 1681): 	at org.apache.commons.lang.builder.ToStringStyle.<clinit>(ToStringStyle.java:94)
> E/AndroidRuntime( 1681): 	... 18 more
> E/AndroidRuntime( 1681): Caused by: java.lang.StringIndexOutOfBoundsException
> E/AndroidRuntime( 1681): 	at java.lang.String.substring(String.java:1571)
> E/AndroidRuntime( 1681): 	at org.apache.commons.lang.SystemUtils.getJavaVersionAsFloat(SystemUtils.java:1153)
> E/AndroidRuntime( 1681): 	at org.apache.commons.lang.SystemUtils.<clinit>(SystemUtils.java:818)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message