From e32e26c7079134b2923b961c23521bbec2be7154 Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Thu, 8 Aug 2024 14:12:38 +0200 Subject: [PATCH] make streamName optional for KinesisInfo --- .../extension/aws/kinesis/function/KinesisInfo.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/java/src/org/lucee/extension/aws/kinesis/function/KinesisInfo.java b/source/java/src/org/lucee/extension/aws/kinesis/function/KinesisInfo.java index 1585979..0208960 100644 --- a/source/java/src/org/lucee/extension/aws/kinesis/function/KinesisInfo.java +++ b/source/java/src/org/lucee/extension/aws/kinesis/function/KinesisInfo.java @@ -120,10 +120,13 @@ public Object invoke(PageContext pc, Object[] args) throws PageException { if (args.length > 6) throw engine.getExceptionUtil().createFunctionException(pc, "KinesisInfo", 0, 6, args.length); // streamName - String streamName = cast.toString(args[0]); - if (Util.isEmpty(streamName, true)) - throw engine.getExceptionUtil().createFunctionException(pc, "KinesisGet", 1, "streamName", "invalid streamName [" + streamName + "],value cannot be empty", null); - else streamName = streamName.trim(); + String streamName = null; + if (args.length > 0) { + streamName = cast.toString(args[0]); + if (Util.isEmpty(streamName, true)) + throw engine.getExceptionUtil().createFunctionException(pc, "KinesisGet", 1, "streamName", "invalid streamName [" + streamName + "],value cannot be empty", null); + else streamName = streamName.trim(); + } // accessKeyId String accessKeyId = null;