Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log only errors for parameter matching #846

Merged
merged 2 commits into from
Apr 30, 2016

Conversation

Bertk
Copy link
Contributor

@Bertk Bertk commented Apr 26, 2016

  • MismatchException is used to consume all separators and this is not an
    error
  • only create an error message if the closing bracket token is not
    following an comma token (might not happen)

- MismatchException is used to consume all separators and this is not an
error
- only create an error message if the closing bracket token is not
following an comma token (might not happen)
@@ -743,19 +743,20 @@ private int matchArguments(List<Token> tokens, List<Token> arguments) {
break;
}
} while (true);

} catch (MismatchException me) {
LOG.debug("Mismatch: expected ','got: '" + rest.get(0).getValue() + "'");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this then be error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically this message is:

Mismatch: expected ',' got: ')'

This is the reason for the exception but not an error. Anything different than ',' or ')' is an error. This message could be an error if the ')' case is not reported.

@jmecosta
Copy link
Member

ok, but then do we even need to do the debug print. if running with -X it will just print loads of not needed stuff. right?

@Bertk
Copy link
Contributor Author

Bertk commented Apr 30, 2016

Yes, the debug information might be huge. I removed this code line. Please check the update.

@guwirth guwirth added the bug label Apr 30, 2016
@guwirth guwirth added this to the 0.9.6 milestone Apr 30, 2016
@guwirth
Copy link
Collaborator

guwirth commented Apr 30, 2016

Code review only without testing with sample 👍

@jmecosta
Copy link
Member

Try still to run this before merging

@jmecosta
Copy link
Member

looks good: 👍

@guwirth guwirth merged commit 15f4caa into SonarOpenCommunity:master Apr 30, 2016
@Bertk Bertk deleted the fix-logs branch October 3, 2016 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants