From 39a470f772b4aad696bfc57eaa642c692efd9b75 Mon Sep 17 00:00:00 2001 From: Carlos Miranda Date: Tue, 22 Jul 2014 08:50:54 +0800 Subject: [PATCH] #192 Added Immutable.Array annotation --- .../src/main/java/com/s3auth/hosts/DirectoryListing.java | 1 + .../src/main/java/com/s3auth/hosts/ObjectVersionListing.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/s3auth-hosts/src/main/java/com/s3auth/hosts/DirectoryListing.java b/s3auth-hosts/src/main/java/com/s3auth/hosts/DirectoryListing.java index 96cea44e..385d77c0 100644 --- a/s3auth-hosts/src/main/java/com/s3auth/hosts/DirectoryListing.java +++ b/s3auth-hosts/src/main/java/com/s3auth/hosts/DirectoryListing.java @@ -77,6 +77,7 @@ final class DirectoryListing implements Resource { /** * Byte representation of transformed data. */ + @Immutable.Array private final transient byte[] content; /** diff --git a/s3auth-hosts/src/main/java/com/s3auth/hosts/ObjectVersionListing.java b/s3auth-hosts/src/main/java/com/s3auth/hosts/ObjectVersionListing.java index a962f80a..38c7ea5f 100644 --- a/s3auth-hosts/src/main/java/com/s3auth/hosts/ObjectVersionListing.java +++ b/s3auth-hosts/src/main/java/com/s3auth/hosts/ObjectVersionListing.java @@ -76,6 +76,7 @@ final class ObjectVersionListing implements Resource { /** * Byte representation of XML data. */ + @Immutable.Array private final transient byte[] content; /** @@ -123,7 +124,7 @@ public int status() { @Override public long writeTo(final OutputStream stream) throws IOException { stream.write(this.content); - return (long) this.content.length; + return this.content.length; } @Override