Skip to content

Commit ea5f2bc

Browse files
committed
Fix the Vert.x Redis client native compilation
A change upstream has introduced a static Random field, so a substitution is required.
1 parent 0c96108 commit ea5f2bc

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

extensions/redis-client/runtime/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@
3535
<groupId>io.quarkus</groupId>
3636
<artifactId>quarkus-devservices</artifactId>
3737
</dependency>
38+
39+
<dependency>
40+
<groupId>org.graalvm.sdk</groupId>
41+
<artifactId>nativeimage</artifactId>
42+
<scope>provided</scope>
43+
</dependency>
44+
3845
<!-- Add the health extension as optional as we will produce the health check only if it's included -->
3946
<dependency>
4047
<groupId>io.quarkus</groupId>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package io.quarkus.redis.runtime.client.graal;
2+
3+
import java.util.Random;
4+
5+
import com.oracle.svm.core.annotate.Alias;
6+
import com.oracle.svm.core.annotate.RecomputeFieldValue;
7+
import com.oracle.svm.core.annotate.TargetClass;
8+
9+
class RedisClientSubstitutions {
10+
11+
}
12+
13+
@TargetClass(className = "io.vertx.redis.client.impl.SentinelTopology")
14+
final class Target_io_vertx_redis_client_impl_SentinelTopology {
15+
16+
@Alias
17+
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Reset)
18+
static Random RANDOM;
19+
}

0 commit comments

Comments
 (0)