diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-08-05 10:34:26 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-08-05 13:52:59 +0200 |
commit | e2daa5befa8916b585567a942141edcb7eff9a19 (patch) | |
tree | 379a210d60f42922461a33e065f112ba710655d9 /sonar-plugin-api | |
parent | 92ab7df5f6d58a9711cdc00dbaafd0648b22e940 (diff) | |
download | sonarqube-e2daa5befa8916b585567a942141edcb7eff9a19.tar.gz sonarqube-e2daa5befa8916b585567a942141edcb7eff9a19.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssue.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssue.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssue.java index 2018f7ac0ed..32737cc3a0e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssue.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/issue/internal/DefaultIssue.java @@ -40,6 +40,18 @@ import org.sonar.api.rule.RuleKey; public class DefaultIssue extends DefaultStorable implements Issue, NewIssue { + private static final class ToExecutionFlow implements Function<List<IssueLocation>, ExecutionFlow> { + @Override + public ExecutionFlow apply(final List<IssueLocation> input) { + return new ExecutionFlow() { + @Override + public List<IssueLocation> locations() { + return ImmutableList.copyOf(input); + } + }; + } + } + private RuleKey ruleKey; private Double effortToFix; private Severity overriddenSeverity; @@ -141,17 +153,7 @@ public class DefaultIssue extends DefaultStorable implements Issue, NewIssue { @Override public List<ExecutionFlow> executionFlows() { - return Lists.transform(this.executionFlows, new Function<List<IssueLocation>, ExecutionFlow>() { - @Override - public ExecutionFlow apply(final List<IssueLocation> input) { - return new ExecutionFlow() { - @Override - public List<IssueLocation> locations() { - return ImmutableList.copyOf(input); - } - }; - } - }); + return Lists.transform(this.executionFlows, new ToExecutionFlow()); } @Override |