diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-12-10 00:34:17 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-12-10 00:48:12 +0400 |
commit | 9d765a68de8a912b57c8606bfcaa5948c93b3e5e (patch) | |
tree | 8c3b414a78ec6c6f6839edbd5c42a497dd33db2e | |
parent | 235d68db9940c5c85323427dc78c964db5804fd5 (diff) | |
download | sonarqube-9d765a68de8a912b57c8606bfcaa5948c93b3e5e.tar.gz sonarqube-9d765a68de8a912b57c8606bfcaa5948c93b3e5e.zip |
SONAR-3077 Don't use ReflectionToStringBuilder in Rule.toString()
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java index 3314ab50ce0..caa18c3e886 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/Rule.java @@ -396,7 +396,17 @@ public final class Rule { @Override public String toString() { - return new ReflectionToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).toString(); + // Note that ReflectionToStringBuilder will not work here - see SONAR-3077 + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) + .append("id", id) + .append("name", name) + .append("key", key) + .append("configKey", configKey) + .append("plugin", pluginName) + .append("enabled", enabled) + .append("priority", priority) + .append("cardinality", cardinality) + .toString(); } private String removeNewLineCharacters(String text) { |