Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
a5a3a020
Commit
a5a3a020
authored
Jan 02, 2020
by
Dmytro Nosan
Committed by
Stephane Nicoll
Jan 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Java 14 to JavaVersion enumeration
See gh-19511
parent
47481464
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
JavaVersion.java
...ain/java/org/springframework/boot/system/JavaVersion.java
+7
-2
JavaVersionTests.java
...ava/org/springframework/boot/system/JavaVersionTests.java
+7
-1
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/JavaVersion.java
View file @
a5a3a020
/*
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
org
.
springframework
.
boot
.
system
;
package
org
.
springframework
.
boot
.
system
;
import
java.lang.invoke.MethodHandles
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -60,7 +61,11 @@ public enum JavaVersion {
...
@@ -60,7 +61,11 @@ public enum JavaVersion {
/**
/**
* Java 13.
* Java 13.
*/
*/
THIRTEEN
(
"13"
,
String
.
class
,
"stripIndent"
);
THIRTEEN
(
"13"
,
String
.
class
,
"stripIndent"
),
/**
* Java 14.
*/
FOURTEEN
(
"14"
,
MethodHandles
.
Lookup
.
class
,
"hasFullPrivilegeAccess"
);
private
final
String
name
;
private
final
String
name
;
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/system/JavaVersionTests.java
View file @
a5a3a020
/*
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -115,4 +115,10 @@ class JavaVersionTests {
...
@@ -115,4 +115,10 @@ class JavaVersionTests {
assertThat
(
JavaVersion
.
getJavaVersion
()).
isEqualTo
(
JavaVersion
.
THIRTEEN
);
assertThat
(
JavaVersion
.
getJavaVersion
()).
isEqualTo
(
JavaVersion
.
THIRTEEN
);
}
}
@Test
@EnabledOnJre
(
JRE
.
JAVA_14
)
void
currentJavaVersionFourteen
()
{
assertThat
(
JavaVersion
.
getJavaVersion
()).
isEqualTo
(
JavaVersion
.
FOURTEEN
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment