-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-52282] Add isJavaWebStartSupported to JNLPLauncher #3766
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,4 +221,19 @@ public boolean filterType(@Nonnull Class<?> contextClass, @Nonnull Descriptor de | |
} | ||
} | ||
|
||
/** | ||
* Returns true if Java Web Start button should be displayed. | ||
* Java Web Start is only supported when the Jenkins server is | ||
* running with Java 8. Earlier Java versions are not supported by Jenkins. | ||
* Later Java versions do not support Java Web Start. | ||
* | ||
* This flag is checked in {@code config.jelly} before displaying the | ||
* Java Web Start button. | ||
* @return {@code true} if Java Web Start button should be displayed. | ||
* @since FIXME | ||
*/ | ||
oleg-nenashev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@Restricted(NoExternalUse.class) // Jelly use | ||
public boolean isJavaWebStartSupported() { | ||
oleg-nenashev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return System.getProperty("java.version", "1.8").startsWith("1.8"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was looking for https://docs.oracle.com/javase/10/docs/api/java/lang/Runtime.Version.html but it's only available since Java 9, sadly. So I guess this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's what I saw as well. I would have preferred a better check, but... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a hack we usually do. Probably we need to move these checks to a utility class |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to
@since
something that's@Restricted