Skip to content

Commit 5080919

Browse files
committed
Use final.
1 parent b8b5c3c commit 5080919

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • src/main/java/org/apache/commons/net/io

src/main/java/org/apache/commons/net/io/Util.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ public static long copyReader(final Reader source, final Writer dest, final int
133133
return IOUtils.copyLarge(source, listener == null ? dest : new ProxyWriter(dest) {
134134

135135
@Override
136-
protected void afterWrite(int n) throws IOException {
136+
protected void afterWrite(final int n) throws IOException {
137137
dest.flush();
138138
listener.bytesTransferred(total.addAndGet(n), n, streamSize);
139139
}
140140
}, new char[bufferSize > 0 ? bufferSize : DEFAULT_COPY_BUFFER_SIZE]);
141-
} catch (IOException e) {
141+
} catch (final IOException e) {
142142
throw new CopyStreamException("IOException caught while copying.", total.get(), e);
143143
}
144144
}
@@ -227,15 +227,15 @@ public static long copyStream(final InputStream source, final OutputStream dest,
227227
return IOUtils.copyLarge(source, listener == null ? dest : new ProxyOutputStream(dest) {
228228

229229
@Override
230-
protected void afterWrite(int n) throws IOException {
230+
protected void afterWrite(final int n) throws IOException {
231231
if (flush) {
232232
dest.flush();
233233
}
234234
listener.bytesTransferred(total.addAndGet(n), n, streamSize);
235235
}
236236

237237
}, new byte[bufferSize > 0 ? bufferSize : DEFAULT_COPY_BUFFER_SIZE]);
238-
} catch (IOException e) {
238+
} catch (final IOException e) {
239239
throw new CopyStreamException("IOException caught while copying.", total.get(), e);
240240
}
241241
}

0 commit comments

Comments
 (0)