Skip to content
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

Add bytecode mapping for Java 18, 19, 20 #214

Merged
merged 1 commit into from
Jun 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ public class EnforceBytecodeVersion
// Java 17
JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put( "17", 61 );
JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put( "1.17", 61 );

// Java 18
JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put( "18", 62 );

// Java 19
JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put( "19", 63 );

// Java 20
JDK_TO_MAJOR_VERSION_NUMBER_MAPPING.put( "20", 64 );
}

static String renderVersion( int major, int minor )
Expand Down Expand Up @@ -242,7 +251,7 @@ private void computeParameters()
if ( needle == null )
{
throw new IllegalArgumentException( "Unknown JDK version given. Should be something like " +
"\"1.7\", \"8\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\"" );
"\"1.7\", \"8\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"20\"" );
}
maxJavaMajorVersionNumber = needle;
if ( !strict && needle < 53 )
Expand Down