mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8085822: JEP 223: New Version-String Scheme (initial integration)
Co-authored-by: Kumar Srinivasan <kumar.x.srinivasan@oracle.com> Reviewed-by: erikj, dcubed, dholmes, alanb
This commit is contained in:
parent
63dc40184a
commit
ebd376a99e
4 changed files with 10 additions and 7 deletions
|
@ -45,7 +45,10 @@ public class SourceTargetTest extends Tester {
|
|||
@Test
|
||||
void testSourceTarget() throws IOException {
|
||||
String v = System.getProperty("java.specification.version");
|
||||
String latest = v.substring(v.lastIndexOf(".") + 1);
|
||||
String[] va = v.split("\\.");
|
||||
int major = Integer.parseInt(va[0]);
|
||||
boolean newVersion = major > 8;
|
||||
String latest = (newVersion) ? va[0] : va[1];
|
||||
String prev = String.valueOf(Integer.valueOf(latest) - 1);
|
||||
|
||||
writeFile("C.java", "class C { }");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue