Skip to content

Commit

Permalink
Issue #42: CLI option name cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
uschindler committed Nov 23, 2014
1 parent 8946a5f commit 44e7f96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/de/thetaphi/forbiddenapis/CliMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
public final class CliMain {

private final Option classpathOpt, dirOpt, includesOpt, excludesOpt, signaturesfileOpt, bundledsignaturesOpt,
internalruntimeforbiddenOpt, nofailonmissingclassesOpt, allowunresolvablesignaturesOpt, versionOpt, helpOpt;
internalruntimeforbiddenOpt, allowmissingclassesOpt, allowunresolvablesignaturesOpt, versionOpt, helpOpt;
private final CommandLine cmd;

public static final int EXIT_SUCCESS = 0;
Expand Down Expand Up @@ -113,9 +113,9 @@ public CliMain(String... args) throws ExitException {
.withDescription("forbids calls to classes from the internal java runtime (like sun.misc.Unsafe)")
.withLongOpt("internalruntimeforbidden")
.create());
options.addOption(nofailonmissingclassesOpt = OptionBuilder
options.addOption(allowmissingclassesOpt = OptionBuilder
.withDescription("don't fail if a referenced class is missing on classpath")
.withLongOpt("nofailonmissingclasses")
.withLongOpt("allowmissingclasses")
.create());
options.addOption(allowunresolvablesignaturesOpt = OptionBuilder
.withDescription("don't fail if a signature is not resolving.")
Expand Down Expand Up @@ -211,7 +211,7 @@ public void run() throws ExitException {
final URLClassLoader loader = URLClassLoader.newInstance(urls, ClassLoader.getSystemClassLoader());
try {
final Checker checker = new Checker(loader, cmd.hasOption(internalruntimeforbiddenOpt.getLongOpt()),
!cmd.hasOption(nofailonmissingclassesOpt.getLongOpt()), !cmd.hasOption(allowunresolvablesignaturesOpt.getLongOpt())) {
!cmd.hasOption(allowmissingclassesOpt.getLongOpt()), !cmd.hasOption(allowunresolvablesignaturesOpt.getLongOpt())) {
@Override
protected void logError(String msg) {
CliMain.this.logError(msg);
Expand Down

0 comments on commit 44e7f96

Please sign in to comment.