-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve virtual thread related validation in RESTEasy Reactive
The changes include: * Validation is only performed on methods that are annotated with `@RunOnVirtualThread` * Warnings about inability to use virtual threads have been converted to errors * Additional validation is performed regarding the target version of the project
- Loading branch information
Showing
4 changed files
with
94 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ocessor/src/main/java/org/jboss/resteasy/reactive/common/processor/TargetJavaVersion.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.jboss.resteasy.reactive.common.processor; | ||
|
||
/** | ||
* Used to determine the java version of the compiled Java code | ||
*/ | ||
public interface TargetJavaVersion { | ||
|
||
Status isJava19OrHigher(); | ||
|
||
enum Status { | ||
TRUE, | ||
FALSE, | ||
UNKNOWN | ||
} | ||
|
||
final class Unknown implements TargetJavaVersion { | ||
|
||
public static final Unknown INSTANCE = new Unknown(); | ||
|
||
Unknown() { | ||
} | ||
|
||
@Override | ||
public Status isJava19OrHigher() { | ||
return Status.UNKNOWN; | ||
} | ||
} | ||
} |