From 02a066a93cca2f54da064549e8a8b121e1d3e77f Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Wed, 4 Oct 2023 14:52:16 +0200 Subject: [PATCH] set default value correctly --- .../org/lucee/extension/resource/s3/function/S3AddACL.java | 4 ++-- .../org/lucee/extension/resource/s3/function/S3GetACL.java | 2 +- .../lucee/extension/resource/s3/function/S3GetMetaData.java | 2 +- .../org/lucee/extension/resource/s3/function/S3SetACL.java | 2 +- .../lucee/extension/resource/s3/function/S3SetMetaData.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/java/src/org/lucee/extension/resource/s3/function/S3AddACL.java b/source/java/src/org/lucee/extension/resource/s3/function/S3AddACL.java index 4328c1d..8d84e6a 100644 --- a/source/java/src/org/lucee/extension/resource/s3/function/S3AddACL.java +++ b/source/java/src/org/lucee/extension/resource/s3/function/S3AddACL.java @@ -32,7 +32,7 @@ public class S3AddACL extends S3Function { private static final long serialVersionUID = -3487196822940881552L; @Override - public Object invoke(PageContext pc, Object[] args) throws PageException { + public Object invoke(final PageContext pc, final Object[] args) throws PageException { CFMLEngine eng = CFMLEngineFactory.getInstance(); Cast cast = eng.getCastUtil(); if (args.length > 7 || args.length < 3) throw eng.getExceptionUtil().createFunctionException(pc, "S3AddACL", 3, 7, args.length); @@ -47,7 +47,7 @@ public Object invoke(PageContext pc, Object[] args) throws PageException { String accessKeyId = args.length > 3 && args[3] != null ? cast.toString(args[3]) : null; String secretAccessKey = args.length > 4 && args[4] != null ? cast.toString(args[4]) : null; String host = args.length > 5 && args[5] != null ? cast.toString(args[5]) : null; - double timeout = args.length > 6 && !isEmpty(args[6]) ? cast.toDoubleValue(args[6]) : null; + double timeout = args.length > 6 && !isEmpty(args[6]) ? cast.toDoubleValue(args[6]) : 0; try { // create S3 Instance diff --git a/source/java/src/org/lucee/extension/resource/s3/function/S3GetACL.java b/source/java/src/org/lucee/extension/resource/s3/function/S3GetACL.java index 1248c9b..4dd953c 100644 --- a/source/java/src/org/lucee/extension/resource/s3/function/S3GetACL.java +++ b/source/java/src/org/lucee/extension/resource/s3/function/S3GetACL.java @@ -45,7 +45,7 @@ public Object invoke(PageContext pc, Object[] args) throws PageException { String accessKeyId = args.length > 2 && args[2] != null ? cast.toString(args[2]) : null; String secretAccessKey = args.length > 3 && args[3] != null ? cast.toString(args[3]) : null; String host = args.length > 4 && args[4] != null ? cast.toString(args[4]) : null; - double timeout = args.length > 5 && !isEmpty(args[5]) ? cast.toDoubleValue(args[5]) : null; + double timeout = args.length > 5 && !isEmpty(args[5]) ? cast.toDoubleValue(args[5]) : 0; try { // create S3 Instance diff --git a/source/java/src/org/lucee/extension/resource/s3/function/S3GetMetaData.java b/source/java/src/org/lucee/extension/resource/s3/function/S3GetMetaData.java index 8db360d..3e6e85b 100644 --- a/source/java/src/org/lucee/extension/resource/s3/function/S3GetMetaData.java +++ b/source/java/src/org/lucee/extension/resource/s3/function/S3GetMetaData.java @@ -45,7 +45,7 @@ public Object invoke(PageContext pc, Object[] args) throws PageException { String accessKeyId = args.length > 2 && args[2] != null ? cast.toString(args[2]) : null; String secretAccessKey = args.length > 3 && args[3] != null ? cast.toString(args[3]) : null; String host = args.length > 4 && args[4] != null ? cast.toString(args[4]) : null; - double timeout = args.length > 5 && !isEmpty(args[5]) ? cast.toDoubleValue(args[5]) : null; + double timeout = args.length > 5 && !isEmpty(args[5]) ? cast.toDoubleValue(args[5]) : 0; try { // create S3 Instance diff --git a/source/java/src/org/lucee/extension/resource/s3/function/S3SetACL.java b/source/java/src/org/lucee/extension/resource/s3/function/S3SetACL.java index 5fdd2a4..af410e3 100644 --- a/source/java/src/org/lucee/extension/resource/s3/function/S3SetACL.java +++ b/source/java/src/org/lucee/extension/resource/s3/function/S3SetACL.java @@ -47,7 +47,7 @@ public Object invoke(PageContext pc, Object[] args) throws PageException { String accessKeyId = args.length > 3 && args[3] != null ? cast.toString(args[3]) : null; String secretAccessKey = args.length > 4 && args[4] != null ? cast.toString(args[4]) : null; String host = args.length > 5 && args[5] != null ? cast.toString(args[5]) : null; - double timeout = args.length > 6 && !isEmpty(args[6]) ? cast.toDoubleValue(args[6]) : null; + double timeout = args.length > 6 && !isEmpty(args[6]) ? cast.toDoubleValue(args[6]) : 0; try { // create S3 Instance diff --git a/source/java/src/org/lucee/extension/resource/s3/function/S3SetMetaData.java b/source/java/src/org/lucee/extension/resource/s3/function/S3SetMetaData.java index 1e0d9b3..5fd265e 100644 --- a/source/java/src/org/lucee/extension/resource/s3/function/S3SetMetaData.java +++ b/source/java/src/org/lucee/extension/resource/s3/function/S3SetMetaData.java @@ -48,7 +48,7 @@ public Object invoke(PageContext pc, Object[] args) throws PageException { String accessKeyId = args.length > 3 && args[3] != null ? cast.toString(args[3]) : null; String secretAccessKey = args.length > 4 && args[4] != null ? cast.toString(args[4]) : null; String host = args.length > 5 && args[5] != null ? cast.toString(args[5]) : null; - double timeout = args.length > 6 && !isEmpty(args[6]) ? cast.toDoubleValue(args[6]) : null; + double timeout = args.length > 6 && !isEmpty(args[6]) ? cast.toDoubleValue(args[6]) : 0; try { // create S3 Instance