From 8ddf8289ee6392b6066808f1aff931d3098985de Mon Sep 17 00:00:00 2001 From: Filippe Spolti Date: Tue, 13 Sep 2022 05:59:34 -0300 Subject: [PATCH] SecureRandom can't be static initialized at build time (#1397) Fixes: - com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected an instance of Random/SplittableRandom class in the image heap. Signed-off-by: spolti Signed-off-by: spolti --- .../src/main/java/org/acme/RealStockPriceResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java index cc7894fcea..219f20cd6e 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java @@ -27,7 +27,7 @@ @Path("/stock-price") public class RealStockPriceResource { - public static final SecureRandom SECURE_RANDOM = new SecureRandom(); + public final SecureRandom SECURE_RANDOM = new SecureRandom(); @GET @Path("/{symbol}")