package com.atlassian.plugin.util;

/**
 * A simple utility for comparing a java version number to the running version.
 */
public class JavaVersionUtils
{
    public static boolean satisfiesMinVersion(float versionNumber)
    {
        float specVersion = Float.valueOf(System.getProperty("java.specification.version"));
        return specVersion >= versionNumber;
    }

    public static Float resolveVersionFromString(String versionStr)
    {
        try
        {
            return Float.valueOf(versionStr);
        }
        catch(Exception e)
        {
            return null;
        }
    }
}

@@ -154,29 +154,30 @@
 %0A%7B%0A    p
-ublic
+rivate
  static 
 boolean 
@@ -172,88 +172,32 @@
 tic 
-boolean satisfiesMinVersion(float versionNumber)%0A    %7B%0A        float specVersion
+final Float SPEC_VERSION
  = F
@@ -264,34 +264,109 @@
 ));%0A
+%0A
     
-    return specVersion
+public static boolean satisfiesMinVersion(float versionNumber)%0A    %7B%0A        return SPEC_VERSION
  %3E= 

store spec version in constant rather than looking up repeatedly (trevor's suggestion)