You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2017/06/08 17:37:02 UTC
[33/50] [abbrv] commons-cli git commit: Make CheckStyle happy
Make CheckStyle happy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1786144 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/commons-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-cli/commit/f0677c6c
Tree: http://git-wip-us.apache.org/repos/asf/commons-cli/tree/f0677c6c
Diff: http://git-wip-us.apache.org/repos/asf/commons-cli/diff/f0677c6c
Branch: refs/heads/master
Commit: f0677c6c1b967832ef7252373acfa31bb3f12500
Parents: ace721e
Author: Benedikt Ritter <br...@apache.org>
Authored: Thu Mar 9 11:34:57 2017 +0000
Committer: Benedikt Ritter <br...@apache.org>
Committed: Thu Mar 9 11:34:57 2017 +0000
----------------------------------------------------------------------
.../java/org/apache/commons/cli/CommandLine.java | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-cli/blob/f0677c6c/src/main/java/org/apache/commons/cli/CommandLine.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/cli/CommandLine.java b/src/main/java/org/apache/commons/cli/CommandLine.java
index a6dff13..154738a 100644
--- a/src/main/java/org/apache/commons/cli/CommandLine.java
+++ b/src/main/java/org/apache/commons/cli/CommandLine.java
@@ -386,16 +386,21 @@ public class CommandLine implements Serializable
*/
public static final class Builder
{
+ /**
+ * CommandLine that is being build by this Builder.
+ */
private final CommandLine commandLine = new CommandLine();
/**
* Add an option to the command line. The values of the option are stored.
*
* @param opt the processed option
+ *
+ * @return this Builder instance for method chaining.
*/
- public Builder addOption( Option opt )
+ public Builder addOption(Option opt)
{
- commandLine.addOption( opt );
+ commandLine.addOption(opt);
return this;
}
@@ -403,10 +408,12 @@ public class CommandLine implements Serializable
* Add left-over unrecognized option/argument.
*
* @param arg the unrecognized option/argument.
+ *
+ * @return this Builder instance for method chaining.
*/
- public Builder addArg( String arg )
+ public Builder addArg(String arg)
{
- commandLine.addArg( arg );
+ commandLine.addArg(arg);
return this;
}