diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c16216c..67451e3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
java-version:
- - 17
+ - 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
diff --git a/pom.xml b/pom.xml
index 6a5ecee..a818742 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
io.airlift
airbase
- 160
+ 347
bytecode
@@ -28,10 +28,10 @@
true
true
- 17
- 8
+ 25
+ 17
- 9.7
+ 9.9.1
@@ -76,6 +76,12 @@
junit-jupiter-api
test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ test
+
diff --git a/src/main/java/io/airlift/bytecode/ByteCodeGenerator.java b/src/main/java/io/airlift/bytecode/ByteCodeGenerator.java
index 6a0441a..76672a8 100644
--- a/src/main/java/io/airlift/bytecode/ByteCodeGenerator.java
+++ b/src/main/java/io/airlift/bytecode/ByteCodeGenerator.java
@@ -28,8 +28,8 @@
import java.nio.file.Path;
import java.util.Optional;
-import static com.google.common.io.CharStreams.nullWriter;
import static io.airlift.bytecode.ParameterizedType.typeFromJavaClassName;
+import static java.io.Writer.nullWriter;
import static java.nio.file.Files.createDirectories;
import static java.util.Objects.requireNonNull;
diff --git a/src/main/java/io/airlift/bytecode/DynamicClassLoader.java b/src/main/java/io/airlift/bytecode/DynamicClassLoader.java
index 9ce732c..6812a7c 100644
--- a/src/main/java/io/airlift/bytecode/DynamicClassLoader.java
+++ b/src/main/java/io/airlift/bytecode/DynamicClassLoader.java
@@ -121,7 +121,7 @@ protected Class> loadClass(String name, boolean resolve)
if (overrideClassLoader.isPresent()) {
try {
- return resolveClass(overrideClassLoader.get().loadClass(name), resolve);
+ return resolveClass(overrideClassLoader.orElseThrow().loadClass(name), resolve);
}
catch (ClassNotFoundException e) {
// not in override loader
diff --git a/src/main/java/io/airlift/bytecode/HiddenClassGenerator.java b/src/main/java/io/airlift/bytecode/HiddenClassGenerator.java
index e469716..c07d9f4 100644
--- a/src/main/java/io/airlift/bytecode/HiddenClassGenerator.java
+++ b/src/main/java/io/airlift/bytecode/HiddenClassGenerator.java
@@ -77,7 +77,7 @@ public Class extends T> defineHiddenClass(ClassDefinition classDefinition,
definedClassLookup = lookup.defineHiddenClass(bytecode, true);
}
else {
- definedClassLookup = lookup.defineHiddenClassWithClassData(bytecode, classData.get(), true);
+ definedClassLookup = lookup.defineHiddenClassWithClassData(bytecode, classData.orElseThrow(), true);
}
}
catch (IllegalAccessException e) {
diff --git a/src/main/java/io/airlift/bytecode/Scope.java b/src/main/java/io/airlift/bytecode/Scope.java
index 951eaf7..2d44472 100644
--- a/src/main/java/io/airlift/bytecode/Scope.java
+++ b/src/main/java/io/airlift/bytecode/Scope.java
@@ -46,7 +46,7 @@ public class Scope
Scope(Optional thisType, Iterable parameters)
{
if (thisType.isPresent()) {
- thisVariable = new Variable("this", thisType.get());
+ thisVariable = new Variable("this", thisType.orElseThrow());
variables.put("this", thisVariable);
allVariables.add(thisVariable);
}