commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-624) SystemUtils.getJavaVersionAsFloat throws StringIndexOutOfBoundsException on Android runtime/Dalvik VM
Date Sun, 30 Jan 2011 03:50:43 GMT

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

Henri Yandell commented on LANG-624:
------------------------------------

svn ci -m "Removed isJavaVersionAtLeast(float) and (int), and added an enum variant with the
new JavaVersion enum. Updated the rest of the code, switched isJavaVersionAtLeast over to
using java.specification.version and not java.version (the vendor code) and dropped JAVA_VERSION_TRIMMED,
JAVA_VERSION_FLOAT and JAVA_VERSION_INT. See: LANG-624"
Sending        src/main/java/org/apache/commons/lang3/ClassUtils.java
Adding         src/main/java/org/apache/commons/lang3/JavaVersion.java
Sending        src/main/java/org/apache/commons/lang3/SystemUtils.java
Sending        src/test/java/org/apache/commons/lang3/CharEncodingTest.java
Sending        src/test/java/org/apache/commons/lang3/ClassUtilsTest.java
Sending        src/test/java/org/apache/commons/lang3/LocaleUtilsTest.java
Sending        src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
Sending        src/test/java/org/apache/commons/lang3/math/NumberUtilsTest.java
Sending        src/test/java/org/apache/commons/lang3/text/ExtendedMessageFormatTest.java
Sending        src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
Transmitting file data ..........
Committed revision 1065174.

Leaving this open for a short while in case there's any feedback. I went with: "JAVA_SPECIFICATION_VERSION_AS_ENUM"
as the variable name.

> 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
>            Reporter: Travis Truman
>             Fix For: 3.0
>
>         Attachments: AndriodJavaVersion.png, LANG-624.patch
>
>
> 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