From edb9ee86bd53f674a2571b525889711c3baed29d Mon Sep 17 00:00:00 2001 From: Robert Wunderlich Date: Sat, 6 Jan 2024 21:56:25 -0500 Subject: [PATCH] Minor fix of ArrayIndexOutOfBounds Exception Class requires 1 arg (compartment-id) and can optionally accept a 2nd arg (region). Validation incorrectly addressed 2nd arg in the 2 index position and not 1. --- bmc-examples/src/main/java/ApiGatewayExample.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bmc-examples/src/main/java/ApiGatewayExample.java b/bmc-examples/src/main/java/ApiGatewayExample.java index b3777830e93..98fde8996ab 100644 --- a/bmc-examples/src/main/java/ApiGatewayExample.java +++ b/bmc-examples/src/main/java/ApiGatewayExample.java @@ -108,7 +108,7 @@ public static void main(String[] args) throws Exception { } final String compartmentId = args[0]; - final Region region = args.length == 1 ? Region.US_PHOENIX_1 : Region.fromRegionId(args[2]); + final Region region = args.length == 1 ? Region.US_PHOENIX_1 : Region.fromRegionId(args[1]); // Configuring the AuthenticationDetailsProvider. It's assuming there is a default OCI // config file