Skip to content

Commit

Permalink
set default value correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Oct 4, 2023
1 parent c49db38 commit 02a066a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 02a066a

Please sign in to comment.