rmuir commented on code in PR #943:
URL: https://github.com/apache/lucene/pull/943#discussion_r887992569


##########
buildSrc/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java:
##########
@@ -39,20 +39,33 @@
  * Has no dependencies outside of standard java libraries
  */
 public class WrapperDownloader {
+  private static final Runtime.Version REQUIRED_VERSION = 
Runtime.Version.parse("11.0.15");
+
   public static void main(String[] args) {
     if (args.length != 1) {
       System.err.println("Usage: java WrapperDownloader.java <destination>");
       System.exit(1);
     }
 
     try {
+      checkVersion();
       new WrapperDownloader().run(Paths.get(args[0]));
     } catch (Exception e) {
       System.err.println("ERROR: " + e.getMessage());
       System.exit(1);
     }
   }
 
+  public static void checkVersion() {
+    final Runtime.Version version = Runtime.version();
+    if (version.feature() != REQUIRED_VERSION.feature()) {

Review Comment:
   Yes, exactly. 
   
   For branch_9x, at least we should allow `11` and `17` as major, and check 
the bugfix version in either case. I have no opinion/not with whether it is a 
set or a range. I'm personally not concerned with `12..16` as such versions are 
EOL, such versions are expected to be buggy and not work.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to