Skip to content

Commit 897593c

Browse files
committed
Update checkstyle and enforce.
1 parent 7a060bd commit 897593c

5 files changed

Lines changed: 6 additions & 12 deletions

File tree

src/conf/checkstyle.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ limitations under the License.
4646
</module>
4747

4848
<module name="TreeWalker">
49+
<module name="LeftCurly" />
4950

5051
<!-- Checks for Javadoc comments. -->
5152
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
5253
<module name="JavadocType"/>
5354
<module name="JavadocVariable"/>
5455

55-
5656
<!-- Checks for Naming Conventions. -->
5757
<!-- See http://checkstyle.sf.net/config_naming.html -->
5858
<module name="ConstantName"/>
@@ -72,7 +72,6 @@ limitations under the License.
7272
<module name="RedundantImport"/>
7373
<module name="UnusedImports"/>
7474

75-
7675
<!-- Checks for Size Violations. -->
7776
<!-- See http://checkstyle.sf.net/config_sizes.html -->
7877
<!--<module name="FileLength"/>-->

src/main/java/org/apache/commons/cli/GnuParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ protected String[] flatten(final Options options, final String[] arguments, fina
7878
}
7979

8080
if (eatTheRest) {
81-
for (i++; i < arguments.length; i++) // NOPMD
82-
{
81+
for (i++; i < arguments.length; i++) { // NOPMD
8382
tokens.add(arguments[i]);
8483
}
8584
}

src/main/java/org/apache/commons/cli/HelpFormatter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,8 +807,7 @@ private Appendable renderWrappedTextBlock(final StringBuffer sb, final int width
807807
}
808808
renderWrappedText(sb, width, nextLineTabStop, line);
809809
}
810-
} catch (final IOException e) // NOPMD
811-
{
810+
} catch (final IOException e) { // NOPMD
812811
// cannot happen
813812
}
814813

src/main/java/org/apache/commons/cli/Parser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,7 @@ protected void processProperties(final Properties properties) throws ParseExcept
310310
if (opt.getValues() == null || opt.getValues().length == 0) {
311311
try {
312312
opt.addValueForProcessing(value);
313-
} catch (final RuntimeException exp) // NOPMD
314-
{
313+
} catch (final RuntimeException exp) { // NOPMD
315314
// if we cannot add the value don't worry about it
316315
}
317316
}

src/test/java/org/apache/commons/cli/HelpFormatterTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,7 @@ public void testOptionWithoutShortFormat2() {
294294
}
295295

296296
@Test
297-
public void testPrintHelpNewlineFooter()
298-
{
297+
public void testPrintHelpNewlineFooter() {
299298
final HelpFormatter formatter = new HelpFormatter();
300299
final ByteArrayOutputStream out = new ByteArrayOutputStream();
301300
final PrintWriter pw = new PrintWriter(out);
@@ -322,8 +321,7 @@ public void testPrintHelpNewlineFooter()
322321
}
323322

324323
@Test
325-
public void testPrintHelpNewlineHeader()
326-
{
324+
public void testPrintHelpNewlineHeader() {
327325
final HelpFormatter formatter = new HelpFormatter();
328326
final ByteArrayOutputStream out = new ByteArrayOutputStream();
329327
final PrintWriter pw = new PrintWriter(out);

0 commit comments

Comments
 (0)