Skip to content

Commit

Permalink
remove unused/old suppressions. reduce scope on some
Browse files Browse the repository at this point in the history
  • Loading branch information
norwood committed Mar 13, 2018
1 parent 8bc3559 commit 31e6970
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
9 changes: 2 additions & 7 deletions checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@
<suppressions>

<!-- Checkstyle 6.19 doesn't like properly-formatted annotations -->
<suppress files="(KsqlEntity|Cli|Ksql|AbstractCliCommands|CommandStore).java" checks="IndentationCheck"/>

<!-- can't work out how to resolve the issue with the do {..} while -->
<suppress files="CommandStore.java" checks="RightCurly"/>
<suppress files="KsqlEntity.java" checks="IndentationCheck"/>

<!-- Suppress some checks on all files -->
<suppress files="." checks="ExplicitInitializationCheck"/>
<suppress files="." checks="FinalClassCheck"/>
<suppress files="." checks="AbbreviationAsWordInName"/>
<suppress files="." checks="AvoidEscapedUnicodeCharacters"/>
<suppress files="JsonPathTokenizer.java" checks="AvoidEscapedUnicodeCharacters"/>

<!-- Semantics may not be well checked by rules -->
<suppress files="." checks="ParameterNumber"/>
Expand Down
5 changes: 3 additions & 2 deletions ksql-cli/src/main/java/io/confluent/ksql/Ksql.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ public static void main(String[] args) throws IOException {
try (final Cli cli = new Cli(options.getStreamedQueryRowLimit(),
options.getStreamedQueryTimeoutMs(),
restClient,
new JLineTerminal(options.getOutputFormat(), restClient))) {
cli.runInteractively();
new JLineTerminal(options.getOutputFormat(), restClient))
) {
cli.runInteractively();
}
}

Expand Down
7 changes: 3 additions & 4 deletions ksql-cli/src/main/java/io/confluent/ksql/cli/Cli.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ private void handleStatements(String line)
throws IOException, InterruptedException, ExecutionException {
StringBuilder consecutiveStatements = new StringBuilder();
for (SqlBaseParser.SingleStatementContext statementContext :
new KsqlParser().getStatements(line)
) {
new KsqlParser().getStatements(line)) {
String statementText = KsqlEngine.getStatementString(statementContext);
if (statementContext.statement() instanceof SqlBaseParser.QuerystatementContext
|| statementContext.statement() instanceof SqlBaseParser.PrintTopicContext) {
Expand Down Expand Up @@ -402,8 +401,8 @@ private void printKsqlResponse(RestResponse<KsqlEntityList> response) throws IOE
} else if (entity instanceof CommandStatusEntity
&& (
((CommandStatusEntity) entity).getCommandStatus().getStatus()
== CommandStatus.Status.ERROR
)) {
== CommandStatus.Status.ERROR)
) {
String fullMessage = ((CommandStatusEntity) entity).getCommandStatus().getMessage();
terminal.printError(fullMessage.split("\n")[0], fullMessage);
noErrorFromServer = false;
Expand Down

0 comments on commit 31e6970

Please sign in to comment.