Skip to content

Commit

Permalink
Remove SCons Java version check
Browse files Browse the repository at this point in the history
Java versions update faster than we update our SCons version, so this
check is guaranteed to fail at some point.
  • Loading branch information
garfieldnate committed Dec 30, 2022
1 parent 4a63133 commit 2fd1ae5
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions scons/scons-local-4.4.0/SCons/Tool/JavaCommon.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,33 @@ class OuterState:
interfaces, and anonymous inner classes."""

def __init__(self, version=default_java_version):
if version not in (
'1.1',
'1.2',
'1.3',
'1.4',
'1.5',
'1.6',
'1.7',
'1.8',
'5',
'6',
'9.0',
'10.0',
'11.0',
'12.0',
'13.0',
'14.0',
'15.0',
'16.0',
'17.0',
):
msg = "Java version %s not supported" % version
raise NotImplementedError(msg)
# Patched out for use with Soar; this check is unnecessarily strict.
# See https://github.com/SCons/scons/issues/4280.
# if version not in (
# '1.1',
# '1.2',
# '1.3',
# '1.4',
# '1.5',
# '1.6',
# '1.7',
# '1.8',
# '5',
# '6',
# '9.0',
# '10.0',
# '11.0',
# '12.0',
# '13.0',
# '14.0',
# '15.0',
# '16.0',
# '17.0',
# '18.0',
# '19.0',
# ):
# msg = "Java version %s not supported" % version
# raise NotImplementedError(msg)

self.version = version
self.listClasses = []
Expand Down Expand Up @@ -511,7 +515,7 @@ def win32getvnum(java):
extracts the next-to-last component, then trims it further if
it had a complex name, like 'java-1.8.0-openjdk-1.8.0.312-1',
to try and put it on a common footing with the more common style,
which looks like 'jdk-11.0.2'.
which looks like 'jdk-11.0.2'.
This is certainly fragile, and if someone has a 9.0 it won't
sort right since this will still be alphabetic, BUT 9.0 was
Expand Down

0 comments on commit 2fd1ae5

Please sign in to comment.