Skip to content

Commit 8f8639f

Browse files
committed
Changed the visibility of OptionValidator to package private since all its methods are either private or package private
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/branches/cli-1.x@678678 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8ee0ed5 commit 8f8639f

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/java/org/apache/commons/cli/OptionValidator.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
1718
package org.apache.commons.cli;
1819

1920
/**
@@ -22,7 +23,7 @@
2223
* @author John Keyes ( john at integralsource.com )
2324
* @since 1.1
2425
*/
25-
public class OptionValidator {
26+
class OptionValidator {
2627

2728
/**
2829
* <p>Validates whether <code>opt</code> is a permissable Option
@@ -39,8 +40,7 @@ public class OptionValidator {
3940
* @param opt The option string to validate
4041
* @throws IllegalArgumentException if the Option is not valid.
4142
*/
42-
static void validateOption(String opt)
43-
throws IllegalArgumentException
43+
static void validateOption(String opt) throws IllegalArgumentException
4444
{
4545
// check that opt is not NULL
4646
if (opt == null)
@@ -55,8 +55,7 @@ else if (opt.length() == 1)
5555

5656
if (!isValidOpt(ch))
5757
{
58-
throw new IllegalArgumentException("illegal option value '" + ch
59-
+ "'");
58+
throw new IllegalArgumentException("illegal option value '" + ch + "'");
6059
}
6160
}
6261

@@ -69,9 +68,7 @@ else if (opt.length() == 1)
6968
{
7069
if (!isValidChar(chars[i]))
7170
{
72-
throw new IllegalArgumentException(
73-
"opt contains illegal character value '" + chars[i]
74-
+ "'");
71+
throw new IllegalArgumentException("opt contains illegal character value '" + chars[i] + "'");
7572
}
7673
}
7774
}

0 commit comments

Comments
 (0)