Skip to content

Commit

Permalink
Don't apply loom-native-support when LWJGL is upgraded to support Jav…
Browse files Browse the repository at this point in the history
…a 19+.

Fixes a crash in 1.20.1, when using Java 21
  • Loading branch information
modmuss50 committed Jan 10, 2024
1 parent 480dd5e commit 615b816
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ public ApplicationResult getApplicationResult() {
return ApplicationResult.MUST_APPLY;
}

if (platform.getOperatingSystem().isMacOS() && context.isJava19OrLater() && !context.supportsJava19OrLater()) {
// Apply when LWJGL has been updated on MacOS to support Java 19
return ApplicationResult.MUST_APPLY;
}

// A developer can opt into this
return ApplicationResult.CAN_APPLY;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class LoomNativeSupportLibraryProcessorTest extends LibraryProcessorTest {

where:
version || result
JavaVersion.VERSION_20 || LibraryProcessor.ApplicationResult.MUST_APPLY
JavaVersion.VERSION_19 || LibraryProcessor.ApplicationResult.MUST_APPLY
JavaVersion.VERSION_20 || LibraryProcessor.ApplicationResult.CAN_APPLY
JavaVersion.VERSION_19 || LibraryProcessor.ApplicationResult.CAN_APPLY
JavaVersion.VERSION_17 || LibraryProcessor.ApplicationResult.CAN_APPLY
JavaVersion.VERSION_1_8 || LibraryProcessor.ApplicationResult.CAN_APPLY
}
Expand Down

0 comments on commit 615b816

Please sign in to comment.