containable frame: assume jdk 12/13/14 do not have fix for JDK-8231564
These versions are EOL, and although greater than 11, do not include JDK-8231564
This commit is contained in:
@@ -76,6 +76,11 @@ public class ContainableFrame extends JFrame
|
||||
}
|
||||
String[] s = javaVersion.split("\\.");
|
||||
int major = Integer.parseInt(s[0]), minor = Integer.parseInt(s[1]), patch = Integer.parseInt(s[2]);
|
||||
if (major == 12 || major == 13 || major == 14)
|
||||
{
|
||||
// These versions are since EOL & do not include JDK-8231564
|
||||
return false;
|
||||
}
|
||||
return major > 11 || (major == 11 && minor > 0) || (major == 11 && minor == 0 && patch >= 8);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,5 +36,8 @@ public class ContainableFrameTest
|
||||
assertTrue(ContainableFrame.jdk8231564("11.0.8"));
|
||||
assertFalse(ContainableFrame.jdk8231564("11.0.7"));
|
||||
assertFalse(ContainableFrame.jdk8231564("1.8.0_261"));
|
||||
assertFalse(ContainableFrame.jdk8231564("12.0.0"));
|
||||
assertFalse(ContainableFrame.jdk8231564("13.0.0"));
|
||||
assertFalse(ContainableFrame.jdk8231564("14.0.0"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user