diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2018-01-10 21:14:52 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2018-01-14 20:37:37 +0100 |
commit | d55f047c445daf698ccde5f0af9d0669804c818b (patch) | |
tree | 990d01ddad6fd40aff012e1f40bfc8ce77918670 /plugins/sonar-xoo-plugin | |
parent | 4a5be9fbaba0b9729e909eec935852c56f6e71e2 (diff) | |
download | sonarqube-d55f047c445daf698ccde5f0af9d0669804c818b.tar.gz sonarqube-d55f047c445daf698ccde5f0af9d0669804c818b.zip |
Cleanup code based on Intellij inspections
Diffstat (limited to 'plugins/sonar-xoo-plugin')
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java index 6894a96436b..bf1d64b44a3 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java @@ -94,7 +94,7 @@ public class MultilineIssuesSensor implements Sensor { Integer issueFlowNum = Integer.parseInt(m.group(3)); TextPointer newPointer = file.newPointer(currentLine, m.end()); if (!startFlowsPositions.containsKey(issueId)) { - startFlowsPositions.put(issueId, HashBasedTable.<Integer, Integer, TextPointer>create()); + startFlowsPositions.put(issueId, HashBasedTable.create()); } startFlowsPositions.get(issueId).row(issueFlowId).put(issueFlowNum, newPointer); } @@ -106,7 +106,7 @@ public class MultilineIssuesSensor implements Sensor { Integer issueFlowNum = Integer.parseInt(m.group(3)); TextPointer newPointer = file.newPointer(currentLine, m.start()); if (!endFlowsPositions.containsKey(issueId)) { - endFlowsPositions.put(issueId, HashBasedTable.<Integer, Integer, TextPointer>create()); + endFlowsPositions.put(issueId, HashBasedTable.create()); } endFlowsPositions.get(issueId).row(issueFlowId).put(issueFlowNum, newPointer); } diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java index 3e0154067c2..4ba546c0ebb 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java @@ -41,8 +41,8 @@ public class XooPostJobTest { public void increaseCoverage() { new XooPostJob().describe(new DefaultPostJobDescriptor()); PostJobContext context = mock(PostJobContext.class); - when(context.issues()).thenReturn(Arrays.<PostJobIssue>asList()); - when(context.resolvedIssues()).thenReturn(Arrays.<PostJobIssue>asList()); + when(context.issues()).thenReturn(Arrays.asList()); + when(context.resolvedIssues()).thenReturn(Arrays.asList()); new XooPostJob().execute(context); assertThat(logTester.logs()).contains("Resolved issues: 0", "Open issues: 0"); } diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java index a3df4d6dead..63174745eec 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java @@ -76,7 +76,7 @@ public class XooBlameCommandTest { fs.add(inputFile); BlameOutput result = mock(BlameOutput.class); - when(input.filesToBlame()).thenReturn(Arrays.<InputFile>asList(inputFile)); + when(input.filesToBlame()).thenReturn(Arrays.asList(inputFile)); new XooBlameCommand().blame(input, result); verify(result).blameResult(inputFile, Arrays.asList( new BlameLine().revision("123").author("julien").date(DateUtils.parseDate("2014-12-12")), |