diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-10-07 15:26:54 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-10-07 15:26:54 +0200 |
commit | 3ec78d459001df88e6df10b65dfc4998376c0c63 (patch) | |
tree | 357d4c2a89fb9343e280b30a497c6333f4fa8fe0 /sonar-squid | |
parent | 5f948f97d8fdff638bc306e22813dd39b718d2a3 (diff) | |
download | sonarqube-3ec78d459001df88e6df10b65dfc4998376c0c63.tar.gz sonarqube-3ec78d459001df88e6df10b65dfc4998376c0c63.zip |
SONAR-2875 API: deprecate the interface org.sonar.squid.api.CodeCheck
Diffstat (limited to 'sonar-squid')
-rw-r--r-- | sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java | 19 | ||||
-rw-r--r-- | sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java | 5 |
2 files changed, 13 insertions, 11 deletions
diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java b/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java index 8e5a73806c2..a1a22bbb781 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/CheckMessage.java @@ -17,27 +17,26 @@ * License along with Sonar; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ - package org.sonar.squid.api; -import java.text.MessageFormat; -import java.util.Locale; - import org.apache.commons.lang.builder.ToStringBuilder; import org.sonar.check.Message; +import java.text.MessageFormat; +import java.util.Locale; + public class CheckMessage implements Message { private Integer line; private Double cost; private SourceCode sourceCode; - private CodeCheck codeCheck; + private Object checker; private String defaultMessage; private Object[] messageArguments; private Boolean bypassExclusion; - public CheckMessage(CodeCheck rule, String message, Object... messageArguments) { - this.codeCheck = rule; + public CheckMessage(Object checker, String message, Object... messageArguments) { + this.checker = checker; this.defaultMessage = message; this.messageArguments = messageArguments; } @@ -74,8 +73,8 @@ public class CheckMessage implements Message { return bypassExclusion == null ? false : bypassExclusion; } - public CodeCheck getChecker() { - return codeCheck; + public Object getChecker() { + return checker; } public String getDefaultMessage() { @@ -92,7 +91,7 @@ public class CheckMessage implements Message { @Override public String toString() { - return new ToStringBuilder(this).append("source", sourceCode).append("check", codeCheck).append("msg", defaultMessage) + return new ToStringBuilder(this).append("source", sourceCode).append("checker", checker).append("msg", defaultMessage) .append("line", line).toString(); } diff --git a/sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java b/sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java index 7661e65cb99..3253f09d9a3 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java +++ b/sonar-squid/src/main/java/org/sonar/squid/api/CodeCheck.java @@ -17,9 +17,12 @@ * License along with Sonar; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ - package org.sonar.squid.api; +/** + * @deprecated since 2.12. See https://jira.codehaus.org/browse/SONAR-2875 + */ +@Deprecated public interface CodeCheck extends CodeVisitor { String getKey(); |