Skip to content

Commit

Permalink
Fix: argument of type 'NoneType' is not iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
mukund-padale committed Jan 24, 2024
1 parent b9b7b1d commit cff1616
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions buildpack/core/java.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ def get_java_major_version(runtime_version):
return _get_major_version(os.getenv(JAVA_VERSION_OVERRIDE_KEY))
if runtime_version >= MXVersion("8.0.0"):
result = runtime.get_metadata_value("JavaVersion")
if "17" in result:
if result is None:
result = 11 # default version for mx 8 or above
elif "17" in result:
result = 17
elif "21" in result:
result = 21
else: # can also mean none
result = 11
return _get_major_version(result)

def _get_major_version(version):
Expand Down

0 comments on commit cff1616

Please sign in to comment.