Skip to content

Commit aea58f8

Browse files
authored
Merge branch 'master' into patch-1
2 parents fac3330 + 70a3927 commit aea58f8

49 files changed

Lines changed: 935 additions & 910 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### https://raw.github.com/github/gitignore/f2ce448f2ba7a092da05482ceca99209127c0884/maven.gitignore
2+
3+
target/
4+
pom.xml.tag
5+
pom.xml.releaseBackup
6+
pom.xml.versionsBackup
7+
pom.xml.next
8+
release.properties
9+
dependency-reduced-pom.xml
10+
buildNumber.properties
11+
.mvn/timing.properties
12+
13+
# Exclude maven wrapper
14+
!/.mvn/wrapper/maven-wrapper.jar
15+
16+
site-content
17+

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jdk:
2222
- oraclejdk8
2323

2424
after_success:
25-
- mvn clean cobertura:cobertura coveralls:report
25+
- mvn clean test jacoco:report coveralls:report -Ptravis-jacoco

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
Apache Commons CLI
4444
===================
4545

46+
[![Build Status](https://travis-ci.org/apache/commons-cli.svg?branch=master)](https://travis-ci.org/apache/commons-cli)
47+
[![Coverage Status](https://coveralls.io/repos/github/apache/commons-cli/badge.svg?branch=master)](https://coveralls.io/github/apache/commons-cli?branch=master)
48+
4649
Apache Commons CLI provides a simple API for presenting, processing and validating a command line interface.
4750

4851
Documentation

pom.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@
4040
</issueManagement>
4141

4242
<scm>
43-
<connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/cli/trunk/</connection>
44-
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/proper/cli/trunk/</developerConnection>
45-
<url>http://svn.apache.org/viewvc/commons/proper/cli/trunk/</url>
43+
<connection>scm:git:http://git-wip-us.apache.org/repos/asf/commons-cli.git</connection>
44+
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/commons-cli.git</developerConnection>
45+
<url>https://git-wip-us.apache.org/repos/asf?p=commons-cli.git</url>
46+
<tag>HEAD</tag>
4647
</scm>
4748

4849
<developers>
@@ -166,6 +167,7 @@
166167
<maven.compiler.source>1.5</maven.compiler.source>
167168
<maven.compiler.target>1.5</maven.compiler.target>
168169
<commons.componentid>cli</commons.componentid>
170+
<commons.module.name>org.apache.commons.cli</commons.module.name>
169171
<commons.release.version>1.4</commons.release.version>
170172
<commons.release.name>commons-cli-${commons.release.version}</commons.release.name>
171173
<commons.osgi.symbolicName>org.apache.commons.cli</commons.osgi.symbolicName>

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
<action type="add" dev="britter" due-to="Christoph Läubrich" issue="CLI-271">
2727
CommandLine.getXXX and CommandLine.hasXXX should accept an Option as a parameter
2828
</action>
29+
<action type="add" dev="ggregory" due-to="Jason Dillon" issue="CLI-276">
30+
Adjust access-modifier of checkRequiredOptions() to protected.
31+
</action>
2932
</release>
3033

3134
<release version="1.4" date="2017-03-09" description="New features and bug fixes">

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class AlreadySelectedException extends ParseException
4242
*
4343
* @param message the detail message
4444
*/
45-
public AlreadySelectedException(String message)
45+
public AlreadySelectedException(final String message)
4646
{
4747
super(message);
4848
}
@@ -55,7 +55,7 @@ public AlreadySelectedException(String message)
5555
* @param option the option that triggered the exception
5656
* @since 1.2
5757
*/
58-
public AlreadySelectedException(OptionGroup group, Option option)
58+
public AlreadySelectedException(final OptionGroup group, final Option option)
5959
{
6060
this("The option '" + option.getKey() + "' was specified but an option from this group "
6161
+ "has already been selected: '" + group.getSelected() + "'");

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class AmbiguousOptionException extends UnrecognizedOptionException
4242
* @param option the partial option name
4343
* @param matchingOptions the options matching the name
4444
*/
45-
public AmbiguousOptionException(String option, Collection<String> matchingOptions)
45+
public AmbiguousOptionException(final String option, final Collection<String> matchingOptions)
4646
{
4747
super(createMessage(option, matchingOptions), option);
4848
this.matchingOptions = matchingOptions;
@@ -64,13 +64,13 @@ public Collection<String> getMatchingOptions()
6464
* @param matchingOptions
6565
* @return
6666
*/
67-
private static String createMessage(String option, Collection<String> matchingOptions)
67+
private static String createMessage(final String option, final Collection<String> matchingOptions)
6868
{
69-
StringBuilder buf = new StringBuilder("Ambiguous option: '");
69+
final StringBuilder buf = new StringBuilder("Ambiguous option: '");
7070
buf.append(option);
7171
buf.append("' (could be: ");
7272

73-
Iterator<String> it = matchingOptions.iterator();
73+
final Iterator<String> it = matchingOptions.iterator();
7474
while (it.hasNext())
7575
{
7676
buf.append("'");

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public class BasicParser extends Parser
4141
* @return The <code>arguments</code> String array.
4242
*/
4343
@Override
44-
protected String[] flatten(@SuppressWarnings("unused") Options options,
45-
String[] arguments,
46-
@SuppressWarnings("unused") boolean stopAtNonOption)
44+
protected String[] flatten(@SuppressWarnings("unused") final Options options,
45+
final String[] arguments,
46+
@SuppressWarnings("unused") final boolean stopAtNonOption)
4747
{
4848
// just echo the arguments
4949
return arguments;

0 commit comments

Comments
 (0)