]> source.dussan.org Git - sonarqube.git/commitdiff
Add missing deprecated annotations
authorEvgeny Mandrikov <mandrikov@gmail.com>
Fri, 28 Jan 2011 00:02:48 +0000 (03:02 +0300)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Mon, 31 Jan 2011 23:16:34 +0000 (02:16 +0300)
sonar-plugin-api/src/main/java/org/sonar/api/Plugins.java
sonar-plugin-api/src/main/java/org/sonar/api/batch/AbstractCoverageExtension.java
sonar-plugin-api/src/main/java/org/sonar/api/rules/ActiveRule.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/KeyValueFormat.java

index c4a1bf54ed34a7e78aa47760bfb70a3bc9530b4b..28f5d0a22d9ac412614f7b751d114939580ec9be 100644 (file)
@@ -29,6 +29,7 @@ import java.util.Collection;
  * @since 1.10
  * @deprecated since 2.1
  */
+@Deprecated
 public class Plugins {
 
   private PluginRepository pluginProvider;
index 02869c36a5bfe6b1b95ebfdd8b3b376919e34dfd..0045af529b5301d9000b39bfefffad882ffd8ebb 100644 (file)
@@ -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) {
   }
 
index c2d33ec2eb55711cac64b09d2526182f9f8d4719..8fe4e0aea91a20cb5f06229142839daf3b3de2e4 100644 (file)
@@ -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;
   }
index 4b5c34feba01227c821cc06ce765826e1da272fe..aac614f317b686a0cf070f6ff49deece50621515 100644 (file)
@@ -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;
       }