Skip to content

Commit

Permalink
native image fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rashtao committed Jan 12, 2024
1 parent 5cee6e9 commit 8b3d62a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
4 changes: 2 additions & 2 deletions driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>22.3.3</version>
<scope>test</scope>
<version>23.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.smallrye.config</groupId>
Expand Down
22 changes: 22 additions & 0 deletions driver/src/test/java/graal/BrotliSubstitutions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package graal;

import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;


@TargetClass(className = "io.netty.handler.codec.compression.Brotli")
final class Target_com_arangodb_shaded_netty_handler_codec_compression_Brotli {
@Substitute
public static boolean isAvailable() {
return false;
}

@Substitute
public static void ensureAvailability() throws Throwable {
throw new UnsupportedOperationException();
}
}

public class BrotliSubstitutions {

}
2 changes: 1 addition & 1 deletion driver/src/test/java/graal/VertxSubstitutions.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void close(Promise<Void> promise) {
}

@Substitute
public MessageImpl createMessage(boolean send, String address, MultiMap headers, Object body, String codecName) {
public MessageImpl createMessage(boolean send, boolean isLocal, String address, MultiMap headers, Object body, String codecName) {
throw new RuntimeException("Not Implemented");
}

Expand Down
8 changes: 1 addition & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.27</version>
<version>0.9.28</version>
<extensions>true</extensions>
<executions>
<execution>
Expand All @@ -432,12 +432,6 @@
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>brotli4j</artifactId>
<version>1.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion shaded/src/main/java/graal/VertxSubstitutions.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void close(Promise<Void> promise) {
}

@Substitute
public MessageImpl createMessage(boolean send, String address, MultiMap headers, Object body, String codecName) {
public MessageImpl createMessage(boolean send, boolean isLocal, String address, MultiMap headers, Object body, String codecName) {
throw new RuntimeException("Not Implemented");
}

Expand Down

0 comments on commit 8b3d62a

Please sign in to comment.