You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <fl...@gmail.com> on 2006/03/30 09:30:20 UTC
Re: [lang] Help wanted testing on JDK1.6 - Re: svn commit: r389912
Yep, it's true (1.6beta2 on linux).
We have other tests that fail under 1.6 (and not 1.4), will dig into
those a bit more.
Hen
On 3/29/06, Stephen Colebourne <sc...@btopenworld.com> wrote:
> I have checked in the SystemUtils code to check the java.version system
> property for JDK1.6. However, I don't have JDK1.6 installed, so I can't
> test it easily. Please mail the list if this statement is true on 1.6.
>
> SystemUtils.IS_JAVA_1_6 = true
>
> Thanks
> Stephen
>
>
> scolebourne@apache.org wrote:
> > Author: scolebourne
> > Date: Wed Mar 29 14:27:48 2006
> > New Revision: 389912
> >
> > URL: http://svn.apache.org/viewcvs?rev=389912&view=rev
> > Log:
> > Add checks for JDK1.6
> >
> > Modified:
> > jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java
> > jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SystemUtilsTest.java
> >
> > Modified: jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java
> > URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java?rev=389912&r1=389911&r2=389912&view=diff
> > ==============================================================================
> > --- jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java (original)
> > +++ jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/SystemUtils.java Wed Mar 29 14:27:48 2006
> > @@ -876,6 +876,14 @@
> > */
> > public static final boolean IS_JAVA_1_5 = getJavaVersionMatches("1.5");
> >
> > + /**
> > + * <p>Is <code>true</code> if this is Java version 1.6 (also 1.6.x versions).</p>
> > + *
> > + * <p>The field will return <code>false</code> if {@link #JAVA_VERSION} is
> > + * <code>null</code>.</p>
> > + */
> > + public static final boolean IS_JAVA_1_6 = getJavaVersionMatches("1.6");
> > +
> > // Operating system checks
> > //-----------------------------------------------------------------------
> > // These MUST be declared after those above as they depend on the
> >
> > Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SystemUtilsTest.java
> > URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SystemUtilsTest.java?rev=389912&r1=389911&r2=389912&view=diff
> > ==============================================================================
> > --- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SystemUtilsTest.java (original)
> > +++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/SystemUtilsTest.java Wed Mar 29 14:27:48 2006
> > @@ -245,16 +245,49 @@
> > assertEquals(false, SystemUtils.IS_JAVA_1_3);
> > assertEquals(false, SystemUtils.IS_JAVA_1_4);
> > assertEquals(false, SystemUtils.IS_JAVA_1_5);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_6);
> > } else if (javaVersion.startsWith("1.1")) {
> > - assertTrue(SystemUtils.IS_JAVA_1_1);
> > + assertEquals(true, SystemUtils.IS_JAVA_1_1);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_2);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_3);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_4);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_5);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_6);
> > } else if (javaVersion.startsWith("1.2")) {
> > - assertTrue(SystemUtils.IS_JAVA_1_2);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_1);
> > + assertEquals(true, SystemUtils.IS_JAVA_1_2);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_3);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_4);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_5);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_6);
> > } else if (javaVersion.startsWith("1.3")) {
> > - assertTrue(SystemUtils.IS_JAVA_1_3);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_1);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_2);
> > + assertEquals(true, SystemUtils.IS_JAVA_1_3);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_4);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_5);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_6);
> > } else if (javaVersion.startsWith("1.4")) {
> > - assertTrue(SystemUtils.IS_JAVA_1_4);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_1);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_2);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_3);
> > + assertEquals(true, SystemUtils.IS_JAVA_1_4);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_5);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_6);
> > } else if (javaVersion.startsWith("1.5")) {
> > - assertTrue(SystemUtils.IS_JAVA_1_5);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_1);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_2);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_3);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_4);
> > + assertEquals(true, SystemUtils.IS_JAVA_1_5);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_6);
> > + } else if (javaVersion.startsWith("1.6")) {
> > + assertEquals(false, SystemUtils.IS_JAVA_1_1);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_2);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_3);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_4);
> > + assertEquals(false, SystemUtils.IS_JAVA_1_5);
> > + assertEquals(true, SystemUtils.IS_JAVA_1_6);
> > } else {
> > System.out.println("Can't test IS_JAVA value");
> > }
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org