In StorageSample.java calling listBucket on a bucket that is empty will throw a null pointer exception instead of returning an empty list or null. As a result, in the main method, bucketContents will never be null despite there being an intended check and warning logged to System.out.