From 341468768ac6c978c08dec46fcd9131146c17a3b Mon Sep 17 00:00:00 2001 From: Massimo Paladin Date: Fri, 2 Oct 2015 14:45:07 +0200 Subject: [PATCH] SONARJAVA-1272 Disable secondary location test and remove it from apidocs --- .../checks/verifier/JavaCheckVerifier.java | 1 - .../verifier/JavaCheckVerifierTest.java | 22 ------------------- .../org/sonar/java/model/VisitorsBridge.java | 2 +- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/java-checks-testkit/src/main/java/org/sonar/java/checks/verifier/JavaCheckVerifier.java b/java-checks-testkit/src/main/java/org/sonar/java/checks/verifier/JavaCheckVerifier.java index c8016a91556..2b029bc9377 100644 --- a/java-checks-testkit/src/main/java/org/sonar/java/checks/verifier/JavaCheckVerifier.java +++ b/java-checks-testkit/src/main/java/org/sonar/java/checks/verifier/JavaCheckVerifier.java @@ -74,7 +74,6 @@ *
  • endLine: relative endLine where the highlight ends (i.e. +1), same line if omitted
  • *
  • endColumn: column where the highlight ends
  • *
  • effortToFix: the cost to fix as integer
  • - *
  • secondary: a comma separated list of integers identifying the lines of secondary locations if any
  • * */ @Beta diff --git a/java-checks-testkit/src/test/java/org/sonar/java/checks/verifier/JavaCheckVerifierTest.java b/java-checks-testkit/src/test/java/org/sonar/java/checks/verifier/JavaCheckVerifierTest.java index 7a6d1953e6c..ef71e52257e 100644 --- a/java-checks-testkit/src/test/java/org/sonar/java/checks/verifier/JavaCheckVerifierTest.java +++ b/java-checks-testkit/src/test/java/org/sonar/java/checks/verifier/JavaCheckVerifierTest.java @@ -212,28 +212,6 @@ public void verify_should_fail_when_using_incorrect_endLine() throws IOException } } - @Test - public void verify_should_fail_when_using_incorrect_secondaryLocation() throws IOException { - IssuableSubscriptionVisitor visitor = new FakeVisitor().withDefaultIssues(); - try { - JavaCheckVerifier.verify("src/test/files/JavaCheckVerifierIncorrectSecondaryLocation.java", visitor); - Fail.fail(); - } catch (AssertionError e) { - assertThat(e).hasMessage("Secondary locations: expected: [] unexpected:[3]"); - } - } - - @Test - public void verify_should_fail_when_using_incorrect_secondaryLocation2() throws IOException { - IssuableSubscriptionVisitor visitor = new FakeVisitor().withDefaultIssues(); - try { - JavaCheckVerifier.verify("src/test/files/JavaCheckVerifierIncorrectSecondaryLocation2.java", visitor); - Fail.fail(); - } catch (AssertionError e) { - assertThat(e).hasMessage("Secondary locations: expected: [5] unexpected:[]"); - } - } - private static class FakeVisitor extends IssuableSubscriptionVisitor { Multimap issues = LinkedListMultimap.create(); diff --git a/java-squid/src/main/java/org/sonar/java/model/VisitorsBridge.java b/java-squid/src/main/java/org/sonar/java/model/VisitorsBridge.java index 7e84315dc35..644a8278e7a 100644 --- a/java-squid/src/main/java/org/sonar/java/model/VisitorsBridge.java +++ b/java-squid/src/main/java/org/sonar/java/model/VisitorsBridge.java @@ -281,7 +281,7 @@ public void addIssue(File file, JavaCheck check, int line, String message) { /** * - * FIXME(mpaladin) DO NOT GO ON RELEASE WITH THIS CONSTANT SET TO TRUE + * DO NOT GO ON RELEASE WITH THIS CONSTANT SET TO TRUE * * **/ private static final boolean ENABLE_NEW_APIS = false;