Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fail-fast: false
matrix:
java-version:
- 17
- 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down
14 changes: 10 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.airlift</groupId>
<artifactId>airbase</artifactId>
<version>160</version>
<version>347</version>
</parent>

<artifactId>bytecode</artifactId>
Expand All @@ -28,10 +28,10 @@
<air.check.skip-pmd>true</air.check.skip-pmd>
<air.check.skip-jacoco>true</air.check.skip-jacoco>

<project.build.targetJdk>17</project.build.targetJdk>
<air.modernizer.java-version>8</air.modernizer.java-version>
<project.build.targetJdk>25</project.build.targetJdk>
<air.modernizer.java-version>17</air.modernizer.java-version>

<dep.asm.version>9.7</dep.asm.version>
<dep.asm.version>9.9.1</dep.asm.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -76,6 +76,12 @@
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/airlift/bytecode/ByteCodeGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/airlift/bytecode/DynamicClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public <T> 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) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/airlift/bytecode/Scope.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Scope
Scope(Optional<ParameterizedType> thisType, Iterable<Parameter> parameters)
{
if (thisType.isPresent()) {
thisVariable = new Variable("this", thisType.get());
thisVariable = new Variable("this", thisType.orElseThrow());
variables.put("this", thisVariable);
allVariables.add(thisVariable);
}
Expand Down