-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update readme. Includes Java 21 patch
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
- Loading branch information
Showing
3 changed files
with
50 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Introduction | ||
|
||
chen works better under Java 21 with virtual threads. Use the provided patch for Java 21. | ||
|
||
```shell | ||
git apply --ignore-space-change --ignore-whitespace contrib/java21.patch | ||
sbt clean stage createDistribution | ||
``` |
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,39 @@ | ||
diff --git a/build.sbt b/build.sbt | ||
index 30f005d..16e9759 100644 | ||
--- a/build.sbt | ||
+++ b/build.sbt | ||
@@ -41,18 +41,18 @@ ThisBuild / libraryDependencies ++= Seq( | ||
ThisBuild / compile / javacOptions ++= Seq( | ||
"-g", // debug symbols | ||
"-Xlint", | ||
- "--release=17" | ||
+ "--release=21" | ||
) ++ { | ||
// fail early if users with JDK8 try to run this | ||
val javaVersion = sys.props("java.specification.version").toFloat | ||
- assert(javaVersion.toInt >= 17, s"this build requires JDK17+ - you're using $javaVersion") | ||
+ assert(javaVersion.toInt >= 21, s"this build requires JDK21+ - you're using $javaVersion") | ||
Nil | ||
} | ||
|
||
ThisBuild / scalacOptions ++= Seq( | ||
"-deprecation", // Emit warning and location for usages of deprecated APIs. | ||
"--release", | ||
- "17", | ||
+ "21", | ||
) | ||
|
||
|
||
diff --git a/dataflowengineoss/src/main/scala/io/appthreat/dataflowengineoss/queryengine/Engine.scala b/dataflowengineoss/src/main/scala/io/appthreat/dataflowengineoss/queryengine/Engine.scala | ||
index 00c4297..97822ab 100644 | ||
--- a/dataflowengineoss/src/main/scala/io/appthreat/dataflowengineoss/queryengine/Engine.scala | ||
+++ b/dataflowengineoss/src/main/scala/io/appthreat/dataflowengineoss/queryengine/Engine.scala | ||
@@ -28,7 +28,7 @@ class Engine(context: EngineContext): | ||
|
||
private val logger: Logger = LoggerFactory.getLogger(this.getClass) | ||
private val executorService: ExecutorService = | ||
- Executors.newWorkStealingPool(2) | ||
+ Executors.newVirtualThreadPerTaskExecutor() | ||
private val completionService = | ||
new ExecutorCompletionService[TaskSummary](executorService) | ||
|