Skip to content

Commit a870d4f

Browse files
committed
Add Checkstyle MultipleVariableDeclarations
1 parent 35601cb commit a870d4f

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/conf/checkstyle.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ limitations under the License.
5757
<module name="LeftCurly" />
5858
<module name="MissingOverride" />
5959
<module name="ModifierOrder" />
60+
<module name="MultipleVariableDeclarations" />
6061
<module name="NeedBraces" />
6162
<module name="ParenPad" />
6263
<module name="RedundantImport" />

src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,8 @@ private void readAsync() throws IOException {
414414
//
415415
// So there is no race condition in both the situations.
416416
int read = 0;
417-
int off = 0, len = arr.length;
417+
int off = 0;
418+
int len = arr.length;
418419
Throwable exception = null;
419420
try {
420421
// try to fill the read ahead buffer.

src/test/java/org/apache/commons/io/test/TestUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public static void assertEqualContent(final byte[] b0, final File file) throws I
6464
* @throws IOException If an I/O error occurs while reading the file contents
6565
*/
6666
public static void assertEqualContent(final byte[] b0, final Path file) throws IOException {
67-
int count = 0, numRead = 0;
67+
int count = 0;
68+
int numRead = 0;
6869
final byte[] b1 = new byte[b0.length];
6970
try (InputStream is = Files.newInputStream(file)) {
7071
while (count < b0.length && numRead >= 0) {
@@ -97,7 +98,8 @@ public static void assertEqualContent(final char[] c0, final File file) throws I
9798
* @throws IOException If an I/O error occurs while reading the file contents
9899
*/
99100
public static void assertEqualContent(final char[] c0, final Path file) throws IOException {
100-
int count = 0, numRead = 0;
101+
int count = 0;
102+
int numRead = 0;
101103
final char[] c1 = new char[c0.length];
102104
try (Reader ir = Files.newBufferedReader(file)) {
103105
while (count < c0.length && numRead >= 0) {

0 commit comments

Comments
 (0)