commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r949222 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
Date Fri, 28 May 2010 16:30:16 GMT
Author: ggregory
Date: Fri May 28 16:30:16 2010
New Revision: 949222

URL: http://svn.apache.org/viewvc?rev=949222&view=rev
Log:
(LANG-624) SystemUtils.getJavaVersionAsFloat throws StringIndexOutOfBoundsException on Android
runtime/Dalvik VM. More assertions.

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java?rev=949222&r1=949221&r2=949222&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/SystemUtilsTest.java
Fri May 28 16:30:16 2010
@@ -201,6 +201,7 @@ public class SystemUtilsTest extends Tes
         assertEquals(1.5f, SystemUtils.toJavaVersionFloat("1.5.0"), 0.000001f);
         assertEquals(1.6f, SystemUtils.toJavaVersionFloat("1.6.0"), 0.000001f);
         assertEquals(1.31f, SystemUtils.toJavaVersionFloat("JavaVM-1.3.1"), 0.000001f);
+        assertEquals(1.3f, SystemUtils.toJavaVersionFloat("1.3.0 subset"), 0.000001f);
         // This used to return 0f in [lang] version 2.5:
         assertEquals(1.3f, SystemUtils.toJavaVersionFloat("XXX-1.3.x"), 0.000001f);
     }
@@ -219,6 +220,7 @@ public class SystemUtilsTest extends Tes
         assertEquals(150, SystemUtils.toJavaVersionInt("1.5.0"), 0.000001f);
         assertEquals(160, SystemUtils.toJavaVersionInt("1.6.0"), 0.000001f);
         assertEquals(131, SystemUtils.toJavaVersionInt("JavaVM-1.3.1"), 0.000001f);
+        assertEquals(131, SystemUtils.toJavaVersionInt("1.3.1 subset"), 0.000001f);
         // This used to return 0f in [lang] version 2.5:
         assertEquals(130, SystemUtils.toJavaVersionInt("XXX-1.3.x"), 0.000001f);
     }



Mime
View raw message