From d55f047c445daf698ccde5f0af9d0669804c818b Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 10 Jan 2018 21:14:52 +0100 Subject: Cleanup code based on Intellij inspections --- .../src/main/java/org/sonar/xoo/rule/MultilineIssuesSensor.java | 4 ++-- .../src/test/java/org/sonar/xoo/extensions/XooPostJobTest.java | 4 ++-- .../src/test/java/org/sonar/xoo/scm/XooBlameCommandTest.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/sonar-xoo-plugin') 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.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.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.asList()); - when(context.resolvedIssues()).thenReturn(Arrays.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.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")), -- cgit v1.2.3