File tree Expand file tree Collapse file tree
src/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 * See the License for the specific language governing permissions and
1515 * limitations under the License.
1616 */
17+
1718package org .apache .commons .cli ;
1819
1920/**
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 }
You can’t perform that action at this time.
0 commit comments