[#1387] improvement: compatibility with jdk8 when call JavaUtils.newConcurrentMap - #1389
Merged
Conversation
Contributor
Author
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1389 +/- ##
============================================
+ Coverage 53.22% 54.11% +0.89%
- Complexity 2715 2720 +5
============================================
Files 418 399 -19
Lines 23932 21628 -2304
Branches 2043 2050 +7
============================================
- Hits 12738 11705 -1033
+ Misses 10408 9205 -1203
+ Partials 786 718 -68 ☔ View full report in Codecov by Sentry. |
zuston
reviewed
Dec 20, 2023
| private static final String JAVA_9 = "JAVA_9"; | ||
|
|
||
| public static boolean isJavaVersionAtLeastJava9() { | ||
| if (Enums.getIfPresent(JavaVersion.class, JAVA_9).isPresent() |
Member
There was a problem hiding this comment.
Why we should two checkings rather than 1?
Contributor
Author
Contributor
Author
There was a problem hiding this comment.
Enums.getIfPresent(JavaVersion.class, JAVA_9).isPresent()
is check is "JAVA_9" in enum JavaVersion.
SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_9)
is check is system support jdk9
| public static boolean isJavaVersionAtLeastJava9() { | ||
| if (Enums.getIfPresent(JavaVersion.class, JAVA_9).isPresent() | ||
| && SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_9)) { | ||
| logger.info("Jdk version is at least jdk9"); |
| logger.info("Jdk version is at least jdk9"); | ||
| return true; | ||
| } else { | ||
| logger.info("Jdk version is jdk8"); |
Member
|
Thanks @lifeSo Merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What changes were proposed in this pull request?
compatibility with jdk8 when call JavaUtils.newConcurrentMap
Why are the changes needed?
Fix: #1387
Does this PR introduce any user-facing change?
No.
How was this patch tested?