SONARJAVA-1377 Fine tuning#1545
Merged
benzonico merged 8 commits intoJun 30, 2017
masterSonarSource/sonar-java:masterfrom
SONARJAVA-1377_fine-tuningSonarSource/sonar-java:SONARJAVA-1377_fine-tuningCopy head branch name to clipboard
Merged
SONARJAVA-1377 Fine tuning#1545benzonico merged 8 commits intomasterSonarSource/sonar-java:masterfrom SONARJAVA-1377_fine-tuningSonarSource/sonar-java:SONARJAVA-1377_fine-tuningCopy head branch name to clipboard
benzonico merged 8 commits into
masterSonarSource/sonar-java:masterfrom
SONARJAVA-1377_fine-tuningSonarSource/sonar-java:SONARJAVA-1377_fine-tuningCopy head branch name to clipboard
Conversation
…ng only the '@return' attribute
…d exceptions are described
SonarTech
reviewed
Jun 29, 2017
| .filter(e -> toSimpleName(e.getKey()).equals(exceptionName)) | ||
| .map(Map.Entry::getValue) | ||
| .flatMap(List::stream) | ||
| .collect(Collectors.toList()); |
Contributor
SonarTech
reviewed
Jun 29, 2017
| .filter(e -> isEmptyDescription(e.getValue())) | ||
| .map(Map.Entry::getKey) | ||
| .map(Javadoc::toSimpleName) | ||
| .collect(Collectors.toList()); |
benzonico
requested changes
Jun 30, 2017
| "Should never happen. Exceptions can not be specified other than with an identifier or a fully qualified name, and can not be parametrized."); | ||
| // should not happen, as exceptions can only be defined using identifier or fully qualified name, | ||
| // no parameterized type can be used | ||
| return null; |
Contributor
There was a problem hiding this comment.
So why actually returning something ? I would really prefer to stick to throwing an explicit exception. AFAI understand you only return so you can test it in an existing test : create a dedicated test for the case and keep the explicit failure.
| if (!results.containsKey(elementName)) { | ||
| results.put(elementName, new ArrayList<>()); | ||
| } | ||
| List<String> currentDescriptions = results.get(elementName); |
Contributor
There was a problem hiding this comment.
use results.computeIfAbsent(elementName, ArrayList::new)
benzonico
approved these changes
Jun 30, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.