Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 3678072

Browse files
author
Aleksi Salmela
committed
Fix checkstyle problems.
1 parent 19bab78 commit 3678072

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/main/java/fi/helsinki/cs/tmc/cli/Application.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import org.apache.commons.cli.CommandLine;
1515
import org.apache.commons.cli.GnuParser;
16+
import org.apache.commons.cli.Option;
1617
import org.apache.commons.cli.OptionBuilder;
1718
import org.apache.commons.cli.Options;
1819
import org.apache.commons.cli.ParseException;
@@ -25,7 +26,6 @@
2526
import java.util.List;
2627
import java.util.Map;
2728
import java.util.Set;
28-
import org.apache.commons.cli.Option;
2929

3030
/**
3131
* The application class for the program.

src/main/java/fi/helsinki/cs/tmc/cli/command/HelpCommand.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public void getOptions(Options options) {}
3232

3333
@Override
3434
public void run(CliContext context, CommandLine args) {
35-
Application app = context.getApp();
3635
this.context = context;
3736
this.io = context.getIo();
3837

@@ -54,7 +53,7 @@ public void run(CliContext context, CommandLine args) {
5453
sb.append(commandString).append("\n");
5554
}
5655

57-
app.printHelp(sb.toString());
56+
context.getApp().printHelp(sb.toString());
5857
}
5958

6059
private String handleArgs(CommandLine args) {
@@ -72,7 +71,7 @@ private String handleArgs(CommandLine args) {
7271
return category;
7372
}
7473
Set<String> helpCategories = CommandFactory.getCommandCategories();
75-
if(!helpCategories.contains(category)) {
74+
if (!helpCategories.contains(category)) {
7675
io.errorln("Unknown command category \"" + category + "\".");
7776
return null;
7877
}

src/main/java/fi/helsinki/cs/tmc/cli/core/CommandAnnotationProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private void generateSourceFile(Map<String, String> map) throws IOException {
6565
//remove prefix
6666
packageName = packageName.substring(COMMAND_PACKAGE_NAME.length());
6767
//remove the first dot
68-
if(packageName.startsWith(".")) {
68+
if (packageName.startsWith(".")) {
6969
packageName = packageName.substring(1);
7070
}
7171
}

0 commit comments

Comments
 (0)