From 71ad0125d63f3fb849d5ce80247be86afa6947fd Mon Sep 17 00:00:00 2001 From: norman Date: Mon, 11 Jun 2012 09:58:53 +0200 Subject: [PATCH] No need for volatile --- handler/src/main/java/io/netty/handler/stream/ChunkedFile.java | 2 +- handler/src/main/java/io/netty/handler/stream/ChunkedInput.java | 2 +- .../src/main/java/io/netty/handler/stream/ChunkedNioFile.java | 2 +- .../src/main/java/io/netty/handler/stream/ChunkedNioStream.java | 2 +- .../src/main/java/io/netty/handler/stream/ChunkedStream.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/handler/src/main/java/io/netty/handler/stream/ChunkedFile.java b/handler/src/main/java/io/netty/handler/stream/ChunkedFile.java index 3d1b248e4e..7b637a9321 100644 --- a/handler/src/main/java/io/netty/handler/stream/ChunkedFile.java +++ b/handler/src/main/java/io/netty/handler/stream/ChunkedFile.java @@ -34,7 +34,7 @@ public class ChunkedFile implements ChunkedByteInput { private final long startOffset; private final long endOffset; private final int chunkSize; - private volatile long offset; + private long offset; /** * Creates a new instance that fetches data from the specified file. diff --git a/handler/src/main/java/io/netty/handler/stream/ChunkedInput.java b/handler/src/main/java/io/netty/handler/stream/ChunkedInput.java index 591a6f74c9..ffc5b213d8 100644 --- a/handler/src/main/java/io/netty/handler/stream/ChunkedInput.java +++ b/handler/src/main/java/io/netty/handler/stream/ChunkedInput.java @@ -29,7 +29,7 @@ public interface ChunkedInput { boolean isEndOfInput() throws Exception; /** - * Releases the resources associated with the stream. + * Releases the resources associated with the input. */ void close() throws Exception; diff --git a/handler/src/main/java/io/netty/handler/stream/ChunkedNioFile.java b/handler/src/main/java/io/netty/handler/stream/ChunkedNioFile.java index 1e7e082310..b346442244 100644 --- a/handler/src/main/java/io/netty/handler/stream/ChunkedNioFile.java +++ b/handler/src/main/java/io/netty/handler/stream/ChunkedNioFile.java @@ -36,7 +36,7 @@ public class ChunkedNioFile implements ChunkedByteInput { private long startOffset; private final long endOffset; private final int chunkSize; - private volatile long offset; + private long offset; /** * Creates a new instance that fetches data from the specified file. diff --git a/handler/src/main/java/io/netty/handler/stream/ChunkedNioStream.java b/handler/src/main/java/io/netty/handler/stream/ChunkedNioStream.java index 75b39bd854..4a70a0f49d 100644 --- a/handler/src/main/java/io/netty/handler/stream/ChunkedNioStream.java +++ b/handler/src/main/java/io/netty/handler/stream/ChunkedNioStream.java @@ -30,7 +30,7 @@ public class ChunkedNioStream implements ChunkedByteInput { private final ReadableByteChannel in; private final int chunkSize; - private volatile long offset; + private long offset; /** * Associated ByteBuffer diff --git a/handler/src/main/java/io/netty/handler/stream/ChunkedStream.java b/handler/src/main/java/io/netty/handler/stream/ChunkedStream.java index 3db9ff301f..d8f36e4b95 100644 --- a/handler/src/main/java/io/netty/handler/stream/ChunkedStream.java +++ b/handler/src/main/java/io/netty/handler/stream/ChunkedStream.java @@ -36,7 +36,7 @@ public class ChunkedStream implements ChunkedByteInput { private final PushbackInputStream in; private final int chunkSize; - private volatile long offset; + private long offset; /** * Creates a new instance that fetches data from the specified stream.