Package org.mule.util.JdkVersionUtils

Examples of org.mule.util.JdkVersionUtils.JdkVersion


  }
 
  @Test
  public void testJdkVersion()
  {
    JdkVersion jdkVersion = new JdkVersion("1.7");
    assertEquals(new Integer(1), jdkVersion.getMajor());
    assertEquals(new Integer(7), jdkVersion.getMinor());
    assertNull(jdkVersion.getMicro());
    assertNull(jdkVersion.getUpdate());
    assertNull(jdkVersion.getMilestone());
   
    jdkVersion = new JdkVersion("1.7.0-ea");
    assertEquals(new Integer(1), jdkVersion.getMajor());
    assertEquals(new Integer(7), jdkVersion.getMinor());
    assertEquals(new Integer(0), jdkVersion.getMicro());
    assertNull(jdkVersion.getUpdate());
    assertEquals("ea", jdkVersion.getMilestone());

    jdkVersion = new JdkVersion("1.6.0_29-b05");
    assertEquals(new Integer(1), jdkVersion.getMajor());
    assertEquals(new Integer(6), jdkVersion.getMinor());
    assertEquals(new Integer(0), jdkVersion.getMicro());
    assertEquals(new Integer(29), jdkVersion.getUpdate());
    assertEquals("b05", jdkVersion.getMilestone());
  }
View Full Code Here


  }
 
  @Test
  public void testJdkVersionComparison()
  {
    JdkVersion jdk1_3 = new JdkVersion("1.3");
    JdkVersion jdk1_6_0_5 = new JdkVersion("1.6.0_5");
    JdkVersion jdk1_7 = new JdkVersion("1.7");
    JdkVersion jdk1_6_0_29 = new JdkVersion("1.6.0_29");
    JdkVersion jdk1_6_0_29_b04 = new JdkVersion("1.6.0_29-b04");
    JdkVersion jdk1_6_0_29_b05 = new JdkVersion("1.6.0_29-b05");
   
    assertTrue(jdk1_3.compareTo(jdk1_7) < 0);
    assertTrue(jdk1_7.compareTo(jdk1_3) > 0);
    assertTrue(jdk1_3.compareTo(jdk1_3) == 0);
    assertTrue(jdk1_6_0_29_b05.compareTo(jdk1_6_0_29_b05) == 0);
   
    assertTrue(jdk1_6_0_5.compareTo(jdk1_6_0_29_b04) < 0);
    assertTrue(jdk1_6_0_29_b04.compareTo(jdk1_6_0_5) > 0);
    assertTrue(jdk1_6_0_29.compareTo(jdk1_6_0_5) > 0);
        assertTrue(jdk1_6_0_5.compareTo(jdk1_6_0_29) < 0);
        assertTrue(jdk1_6_0_29.compareTo(jdk1_6_0_29_b04) < 0);
        assertTrue(jdk1_6_0_29_b04.compareTo(jdk1_6_0_29) > 0);
   
    assertTrue(jdk1_6_0_29_b04.compareTo(jdk1_6_0_29_b05) < 0);
    assertTrue(jdk1_6_0_29_b05.compareTo(jdk1_6_0_29_b04) > 0);
   
    assertTrue(jdk1_6_0_29_b04.compareTo(jdk1_7) < 0);
    assertTrue(jdk1_7.compareTo(jdk1_6_0_29_b04) > 0);
  }
View Full Code Here

    protected boolean isExcluded()
    {
        // exclude these tests if we're running in Java 7 because ssl is broken in
        // the jdk
        return super.isExcluded() || System.getProperty("java.version").matches("1\\.7\\..*")
            || JdkVersionUtils.getJdkVersion().compareTo(new JdkVersion("1.6.0_26")) > 0;
    }
View Full Code Here

TOP

Related Classes of org.mule.util.JdkVersionUtils.JdkVersion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.