Skip to content

Commit 39e1da9

Browse files
committed
Checkstyles fixes
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1091550 13f79535-47bb-0310-9956-ffa450edef68
1 parent a1b5d44 commit 39e1da9

4 files changed

Lines changed: 21 additions & 12 deletions

File tree

src/conf/checkstyle.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ limitations under the License.
5555
<property name="allowUndeclaredRTE" value="true"/>
5656
<property name="allowMissingJavadoc" value="true"/>
5757
</module>
58-
<module name="JavadocType">
59-
<property name="authorFormat" value="\S"/>
60-
</module>
58+
<module name="JavadocType"/>
6159
<module name="JavadocVariable"/>
6260

6361

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ public String[] getOptionValues(String opt)
191191
private Option resolveOption(String opt)
192192
{
193193
opt = Util.stripLeadingHyphens(opt);
194-
for (Option option : options) {
194+
for (Option option : options)
195+
{
195196
if (opt.equals(option.getOpt()))
196197
{
197198
return option;

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -896,20 +896,28 @@ protected StringBuffer renderWrappedText(StringBuffer sb, int width,
896896
* @param nextLineTabStop The position on the next line for the first tab.
897897
* @param text The text to be rendered.
898898
*/
899-
private StringBuffer renderWrappedTextBlock(StringBuffer sb, int width, int nextLineTabStop, String text) {
900-
try {
899+
private StringBuffer renderWrappedTextBlock(StringBuffer sb, int width, int nextLineTabStop, String text)
900+
{
901+
try
902+
{
901903
BufferedReader in = new BufferedReader(new StringReader(text));
902904
String line;
903905
boolean firstLine = true;
904-
while ((line = in.readLine()) != null) {
905-
if (!firstLine) {
906+
while ((line = in.readLine()) != null)
907+
{
908+
if (!firstLine)
909+
{
906910
sb.append(getNewLine());
907-
} else {
911+
}
912+
else
913+
{
908914
firstLine = false;
909915
}
910916
renderWrappedText(sb, width, nextLineTabStop, line);
911917
}
912-
} catch (IOException e) {
918+
}
919+
catch (IOException e)
920+
{
913921
// cannot happen
914922
}
915923

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ public List<String> getMatchingOptions(String opt)
227227

228228
List<String> matchingOpts = new ArrayList<String>();
229229

230-
for (String longOpt : longOpts.keySet()) {
231-
if (longOpt.startsWith(opt)) {
230+
for (String longOpt : longOpts.keySet())
231+
{
232+
if (longOpt.startsWith(opt))
233+
{
232234
matchingOpts.add(longOpt);
233235
}
234236
}

0 commit comments

Comments
 (0)