mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8030253: Update langtools to use strings-in-switch
8030262: Update langtools to use foreach loops 8030245: Update langtools to use try-with-resources and multi-catch Reviewed-by: darcy
This commit is contained in:
parent
bedae747dc
commit
dbcdc16212
82 changed files with 703 additions and 895 deletions
|
@ -158,12 +158,14 @@ public enum SourceVersion {
|
|||
try {
|
||||
String specVersion = System.getProperty("java.specification.version");
|
||||
|
||||
if ("1.8".equals(specVersion))
|
||||
return RELEASE_8;
|
||||
else if("1.7".equals(specVersion))
|
||||
return RELEASE_7;
|
||||
else if("1.6".equals(specVersion))
|
||||
return RELEASE_6;
|
||||
switch (specVersion) {
|
||||
case "1.8":
|
||||
return RELEASE_8;
|
||||
case "1.7":
|
||||
return RELEASE_7;
|
||||
case "1.6":
|
||||
return RELEASE_6;
|
||||
}
|
||||
} catch (SecurityException se) {}
|
||||
|
||||
return RELEASE_5;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue