Skip to content

Commit ed56539

Browse files
committed
Add Checkstyle ArrayTypeStyle
1 parent b0a9dac commit ed56539

8 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/conf/checkstyle.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ limitations under the License.
4848
<property name="file" value="src/conf/checkstyle-suppressions.xml"/>
4949
</module>
5050
<module name="TreeWalker">
51+
<module name="ArrayTypeStyle" />
5152
<module name="AvoidStarImport" />
5253
<module name="ExplicitInitializationCheck" />
5354
<module name="FinalLocalVariable" />

src/test/java/org/apache/commons/codec/AbstractStringEncoderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected void checkEncodings(final String[][] data) throws EncoderException {
4141
}
4242
}
4343

44-
protected void checkEncodingVariations(final String expected, final String data[]) throws EncoderException {
44+
protected void checkEncodingVariations(final String expected, final String[] data) throws EncoderException {
4545
for (final String element : data) {
4646
this.checkEncoding(expected, element);
4747
}

src/test/java/org/apache/commons/codec/binary/Codec105ErrorInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public int read() throws IOException {
4141
}
4242

4343
@Override
44-
public int read(final byte b[], final int pos, final int len) throws IOException {
44+
public int read(final byte[] b, final int pos, final int len) throws IOException {
4545
if (this.countdown-- > 0) {
4646
b[pos] = '\n';
4747
return 1;

src/test/java/org/apache/commons/codec/digest/PureJavaCrc32Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private static void doBench(final List<Class<? extends Checksum>> crcs, final Pr
190190
}
191191
}
192192

193-
public static void main(final String args[]) throws Exception {
193+
public static void main(final String[] args) throws Exception {
194194
printSystemProperties(System.out);
195195
doBench(CRCS, System.out);
196196
}

src/test/java/org/apache/commons/codec/language/ColognePhoneticTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private static boolean hasTestCase(final String re) {
9191
}
9292

9393
// Allow command-line testing
94-
public static void main(final String args[]) {
94+
public static void main(final String[] args) {
9595
final ColognePhonetic coder = new ColognePhonetic();
9696
for (final String arg : args) {
9797
final String code = coder.encode(arg);

src/test/java/org/apache/commons/codec/net/QCodecTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
*/
3636
public class QCodecTest {
3737

38-
static final int SWISS_GERMAN_STUFF_UNICODE[] = { 0x47, 0x72, 0xFC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xE4, 0x6D, 0xE4 };
38+
static final int[] SWISS_GERMAN_STUFF_UNICODE = { 0x47, 0x72, 0xFC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xE4, 0x6D, 0xE4 };
3939

40-
static final int RUSSIAN_STUFF_UNICODE[] = { 0x412, 0x441, 0x435, 0x43C, 0x5F, 0x43F, 0x440, 0x438, 0x432, 0x435, 0x442 };
40+
static final int[] RUSSIAN_STUFF_UNICODE = { 0x412, 0x441, 0x435, 0x43C, 0x5F, 0x43F, 0x440, 0x438, 0x432, 0x435, 0x442 };
4141

4242
private String constructString(final int[] unicodeChars) {
4343
final StringBuilder buffer = new StringBuilder();

src/test/java/org/apache/commons/codec/net/QuotedPrintableCodecTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
*/
3535
public class QuotedPrintableCodecTest {
3636

37-
static final int SWISS_GERMAN_STUFF_UNICODE[] = { 0x47, 0x72, 0xFC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xE4, 0x6D, 0xE4 };
37+
static final int[] SWISS_GERMAN_STUFF_UNICODE = { 0x47, 0x72, 0xFC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xE4, 0x6D, 0xE4 };
3838

39-
static final int RUSSIAN_STUFF_UNICODE[] = { 0x412, 0x441, 0x435, 0x43C, 0x5F, 0x43F, 0x440, 0x438, 0x432, 0x435, 0x442 };
39+
static final int[] RUSSIAN_STUFF_UNICODE = { 0x412, 0x441, 0x435, 0x43C, 0x5F, 0x43F, 0x440, 0x438, 0x432, 0x435, 0x442 };
4040

4141
private String constructString(final int[] unicodeChars) {
4242
final StringBuilder buffer = new StringBuilder();

src/test/java/org/apache/commons/codec/net/URLCodecTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
*/
3434
public class URLCodecTest {
3535

36-
static final int SWISS_GERMAN_STUFF_UNICODE[] = { 0x47, 0x72, 0xFC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xE4, 0x6D, 0xE4 };
36+
static final int[] SWISS_GERMAN_STUFF_UNICODE = { 0x47, 0x72, 0xFC, 0x65, 0x7A, 0x69, 0x5F, 0x7A, 0xE4, 0x6D, 0xE4 };
3737

38-
static final int RUSSIAN_STUFF_UNICODE[] = { 0x412, 0x441, 0x435, 0x43C, 0x5F, 0x43F, 0x440, 0x438, 0x432, 0x435, 0x442 };
38+
static final int[] RUSSIAN_STUFF_UNICODE = { 0x412, 0x441, 0x435, 0x43C, 0x5F, 0x43F, 0x440, 0x438, 0x432, 0x435, 0x442 };
3939

4040
private String constructString(final int[] unicodeChars) {
4141
final StringBuilder buffer = new StringBuilder();

0 commit comments

Comments
 (0)