Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

fixed determineJava11OrLater #808

Merged
merged 1 commit into from May 13, 2019
Merged

fixed determineJava11OrLater #808

merged 1 commit into from May 13, 2019

Conversation

cdietrich
Copy link
Member

Signed-off-by: Christian Dietrich christian.dietrich@itemis.de

Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
@cdietrich cdietrich added this to the Release_2.18 milestone May 13, 2019
@cdietrich cdietrich requested a review from szarnekow May 13, 2019 12:10
@@ -62,8 +62,13 @@ public static boolean isJava11OrLater() {
private static boolean determineJava11OrLater() {
String javaVersion = System.getProperty("java.version");
try {
int version = Integer.parseInt(javaVersion);
return version >= 11;
Pattern p = Pattern.compile("(\\d+)(.)*");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively we could check CharSequence.class.getMethod(..) and catch NoSuchMethod.

@cdietrich cdietrich merged commit 028f0ec into master May 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants