From cf8e83dba943ec2924a6a38c92ed91ae759f2cc2 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Mon, 28 Sep 2015 14:35:39 +0200 Subject: [PATCH] Fix quality flaws --- .../main/java/org/sonar/db/version/DecimalColumnDef.java | 6 +++--- .../src/main/java/org/sonar/api/measures/Formula.java | 3 +-- .../src/main/java/org/sonar/api/measures/Metric.java | 9 +++------ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/sonar-db/src/main/java/org/sonar/db/version/DecimalColumnDef.java b/sonar-db/src/main/java/org/sonar/db/version/DecimalColumnDef.java index e131f917496..733564a1164 100644 --- a/sonar-db/src/main/java/org/sonar/db/version/DecimalColumnDef.java +++ b/sonar-db/src/main/java/org/sonar/db/version/DecimalColumnDef.java @@ -32,8 +32,8 @@ import static org.sonar.db.version.ColumnDefValidation.validateColumnName; public class DecimalColumnDef extends AbstractColumnDef { - public static int DEFAULT_PRECISION = 38; - public static int DEFAULT_SACLE = 20; + public final static int DEFAULT_PRECISION = 38; + public final static int DEFAULT_SCALE = 20; private final int precision; private final int scale; @@ -76,7 +76,7 @@ public class DecimalColumnDef extends AbstractColumnDef { @CheckForNull private String columnName; private int precision = DEFAULT_PRECISION; - private int scale = DEFAULT_SACLE; + private int scale = DEFAULT_SCALE; private boolean isNullable = false; public Builder setColumnName(String columnName) { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Formula.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Formula.java index 30f923c727e..83fecc8b274 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Formula.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Formula.java @@ -23,8 +23,7 @@ import java.util.List; /** * @since 1.11 - * @deprecated since 5.2 there's no more decorator on batch side - * TODO add link to new API + * @deprecated since 5.2 there's no more decorator on batch side, please use {@link org.sonar.api.ce.measure.MeasureComputer} instead */ @Deprecated public interface Formula { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java index cd4304e5349..949e0ab603c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java @@ -231,8 +231,7 @@ public class Metric implements Serializable, org.sonar.a /** * @return the metric formula - * @deprecated since 5.2 there's no more decorator on batch side - * TODO add link to new API + * @deprecated since 5.2 there's no more decorator on batch side, please use {@link org.sonar.api.ce.measure.MeasureComputer} instead */ @Deprecated public Formula getFormula() { @@ -244,8 +243,7 @@ public class Metric implements Serializable, org.sonar.a * * @param formula the formula * @return this - * @deprecated since 5.2 there's no more decorator on batch side - * TODO add link to new API + * @deprecated since 5.2 there's no more decorator on batch side, please use {@link org.sonar.api.ce.measure.MeasureComputer} instead */ @Deprecated public Metric setFormula(Formula formula) { @@ -657,8 +655,7 @@ public class Metric implements Serializable, org.sonar.a * @param f the formula * @return the builder * - * @deprecated since 5.2, it's no more possible to define a formula on a metric - * TODO add a link to the new API to declare formulas + * @deprecated since 5.2, it's no more possible to define a formula on a metric, please use {@link org.sonar.api.ce.measure.MeasureComputer} instead */ @Deprecated public Builder setFormula(Formula f) { -- 2.39.5