Package com.sforce.ws

Class JavaVersion

java.lang.Object
com.sforce.ws.JavaVersion
All Implemented Interfaces:
Comparable<JavaVersion>

public class JavaVersion extends Object implements Comparable<JavaVersion>
This class represents a semantic java version that can parse a string into different semantic version components (feature, interim, patch, update and build) and can compare two versions based on these components.
Author:
arjun.mehrotra
  • Field Details

  • Method Details

    • parse

      public static JavaVersion parse(String version)
    • javaVersionHasABug

      public static boolean javaVersionHasABug(String runtimeVersion)
      Check if the provided java version has been patched for the bug JDK-8209178. Refer JDK-8209178 to get the list of java versions that have fixed the bug.
      Parameters:
      runtimeVersion - java version
      Returns:
      true, if the java version has been patched for the bug, false otherwise
    • compareTo

      public int compareTo(JavaVersion that)
      Specified by:
      compareTo in interface Comparable<JavaVersion>
    • getFeature

      public Integer getFeature()
    • getInterim

      public int getInterim()
    • getUpdate

      public int getUpdate()
    • getPatch

      public int getPatch()
    • getBuild

      public int getBuild()
    • toString

      public String toString()
      Overrides:
      toString in class Object