From dd0a8201bc078e09f29b002317d2c6a4441b1722 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Tue, 17 May 2016 13:18:51 +0100 Subject: [PATCH] HADOOP-13158 S3AFileSystem#toString might throw NullPointerException due to null cannedACL. (Chris Nauroth via stevel) --- .../src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java index d6a46178257..eb64bf1cd79 100644 --- a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java +++ b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java @@ -1443,7 +1443,9 @@ public class S3AFileSystem extends FileSystem { sb.append(", partSize=").append(partSize); sb.append(", enableMultiObjectsDelete=").append(enableMultiObjectsDelete); sb.append(", maxKeys=").append(maxKeys); - sb.append(", cannedACL=").append(cannedACL.toString()); + if (cannedACL != null) { + sb.append(", cannedACL=").append(cannedACL.toString()); + } sb.append(", readAhead=").append(readAhead); sb.append(", blockSize=").append(getDefaultBlockSize()); sb.append(", multiPartThreshold=").append(multiPartThreshold);