diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-01-28 03:02:48 +0300 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-02-01 02:16:34 +0300 |
commit | d517a340eacef940a21d1fe8dba827e42fc78a6d (patch) | |
tree | f1769b40019a77234f482fb803f8b5fe0412458e | |
parent | 4bbc0f515d83b57b0629cac40d1059791b963ec9 (diff) | |
download | sonarqube-d517a340eacef940a21d1fe8dba827e42fc78a6d.tar.gz sonarqube-d517a340eacef940a21d1fe8dba827e42fc78a6d.zip |
Add missing deprecated annotations
4 files changed, 17 insertions, 12 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java b/sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java index c4a1bf54ed3..28f5d0a22d9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java @@ -29,6 +29,7 @@ import java.util.Collection; * @since 1.10 * @deprecated since 2.1 */ +@Deprecated public class Plugins { private PluginRepository pluginProvider; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java index 02869c36a5b..0045af529b5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java @@ -26,7 +26,7 @@ import org.sonar.api.resources.Project; /** * This class implements the management of the code coverage engine if there are several. * It is a pre-implementation for Sensors and Decorators - * + * * @since 1.10 */ public abstract class AbstractCoverageExtension implements BatchExtension { @@ -43,10 +43,11 @@ public abstract class AbstractCoverageExtension implements BatchExtension { /** * Default constructor - * + * * @param plugins the list of plugins available * @deprecated since 2.3. Use the default constructor */ + @Deprecated public AbstractCoverageExtension(Plugins plugins) { } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java index c2d33ec2eb5..8fe4e0aea91 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java @@ -152,6 +152,7 @@ public class ActiveRule implements Cloneable { /** * @deprecated since 2.5 use {@link #getSeverity()} instead. See http://jira.codehaus.org/browse/SONAR-1829 */ + @Deprecated public RulePriority getPriority() { return severity; } @@ -159,6 +160,7 @@ public class ActiveRule implements Cloneable { /** * @deprecated since 2.5 use {@link #setSeverity(RulePriority)} instead. See http://jira.codehaus.org/browse/SONAR-1829 */ + @Deprecated public void setPriority(RulePriority priority) { this.severity = priority; } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java index 4b5c34feba0..aac614f317b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java @@ -23,8 +23,8 @@ import com.google.common.collect.Multiset; import org.apache.commons.collections.Bag; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.math.NumberUtils; -import org.sonar.api.rules.RulePriority; import org.slf4j.LoggerFactory; +import org.sonar.api.rules.RulePriority; import java.util.HashMap; import java.util.Map; @@ -32,7 +32,7 @@ import java.util.Map; /** * Util class to format key/value data. Output is a string representation ready to be * injected into the database - * + * * @since 1.10 */ public final class KeyValueFormat { @@ -43,8 +43,8 @@ public final class KeyValueFormat { /** * Transforms a string with the following format : "key1=value1;key2=value2..." * into a Map<KEY, VALUE>. Requires to implement the transform(key,value) method - * - * @param data the input string + * + * @param data the input string * @param transformer the interface to implement * @return a Map of <key, value> */ @@ -63,7 +63,7 @@ public final class KeyValueFormat { /** * Transforms a string with the following format : "key1=value1;key2=value2..." * into a Map<String,String> - * + * * @param data the string to parse * @return a map */ @@ -81,7 +81,7 @@ public final class KeyValueFormat { /** * Transforms a map<KEY,VALUE> into a string with the format : "key1=value1;key2=value2..." - * + * * @param map the map to transform * @return the formatted string */ @@ -107,6 +107,7 @@ public final class KeyValueFormat { * @since 1.11 * @deprecated use Multiset from google collections instead of commons-collections bags */ + @Deprecated public static String format(Bag bag) { return format(bag, 0); } @@ -115,6 +116,7 @@ public final class KeyValueFormat { * @since 1.11 * @deprecated use Multiset from google collections instead of commons-collections bags */ + @Deprecated public static String format(Bag bag, int var) { StringBuilder sb = new StringBuilder(); if (bag != null) { @@ -134,7 +136,7 @@ public final class KeyValueFormat { /** * Transforms a Multiset<?> into a string with the format : "key1=count1;key2=count2..." - * + * * @param set the set to transform * @return the formatted string */ @@ -157,7 +159,7 @@ public final class KeyValueFormat { /** * Transforms a Object... into a string with the format : "object1=object2;object3=object4..." - * + * * @param objects the object list to transform * @return the formatted string */ @@ -223,8 +225,7 @@ public final class KeyValueFormat { value = "0"; } return new KeyValue<RulePriority, Integer>(RulePriority.valueOf(key.toUpperCase()), Integer.parseInt(value)); - } - catch (Exception e) { + } catch (Exception e) { LoggerFactory.getLogger(RulePriorityNumbersPairTransformer.class).warn("Property " + key + " has invalid value: " + value, e); return null; } |