diff options
author | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2013-05-24 17:02:50 +0200 |
---|---|---|
committer | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2013-05-24 17:02:50 +0200 |
commit | 7d588f9eab46c11e7f8b01c8b268dd21320a3708 (patch) | |
tree | a53a0987f7c911577bc0c80b880a318abea1de11 /org.jacoco.report/src/org/jacoco/report/check/Limit.java | |
parent | 55fae171b754e20062fae7cdb2d5feae8ee54017 (diff) | |
download | platform_external_jacoco-7d588f9eab46c11e7f8b01c8b268dd21320a3708.tar.gz platform_external_jacoco-7d588f9eab46c11e7f8b01c8b268dd21320a3708.tar.bz2 platform_external_jacoco-7d588f9eab46c11e7f8b01c8b268dd21320a3708.zip |
Do not overload setters as Maven configuration will not properly work
with this.
Diffstat (limited to 'org.jacoco.report/src/org/jacoco/report/check/Limit.java')
-rw-r--r-- | org.jacoco.report/src/org/jacoco/report/check/Limit.java | 46 |
1 files changed, 12 insertions, 34 deletions
diff --git a/org.jacoco.report/src/org/jacoco/report/check/Limit.java b/org.jacoco.report/src/org/jacoco/report/check/Limit.java index 8aec0ded..113cc3c7 100644 --- a/org.jacoco.report/src/org/jacoco/report/check/Limit.java +++ b/org.jacoco.report/src/org/jacoco/report/check/Limit.java @@ -108,64 +108,42 @@ public class Limit { * @return configured minimum value, or <code>null</code> if no minimum is * given */ - public BigDecimal getMinimum() { - return minimum; + public String getMinimum() { + return minimum == null ? null : minimum.toPlainString(); } /** - * Sets allowed minimum value. Coverage ratios are given in the range from - * 0.0 to 1.0. + * Sets allowed minimum value as decimal string representation. The given + * precision is also considered in error messages. Coverage ratios are given + * in the range from 0.0 to 1.0. * * @param minimum * allowed minimum or <code>null</code>, if no minimum should be * checked */ - public void setMinimum(final BigDecimal minimum) { - this.minimum = minimum; - } - - /** - * Sets allowed minimum value as String representation. - * - * @param minimum - * allowed minimum or <code>null</code>, if no minimum should be - * checked - * @see Limit#setMinimum(BigDecimal) - */ public void setMinimum(final String minimum) { - setMinimum(minimum == null ? null : new BigDecimal(minimum)); + this.minimum = minimum == null ? null : new BigDecimal(minimum); } /** * @return configured maximum value, or <code>null</code> if no maximum is * given */ - public BigDecimal getMaximum() { - return maximum; + public String getMaximum() { + return maximum == null ? null : maximum.toPlainString(); } /** - * Sets allowed maximum value as String representation. + * Sets allowed maximum value as decimal string representation. The given + * precision is also considered in error messages. Coverage ratios are given + * in the range from 0.0 to 1.0. * * @param maximum * allowed maximum or <code>null</code>, if no maximum should be * checked - * @see #setMaximum(BigDecimal) */ public void setMaximum(final String maximum) { - setMaximum(maximum == null ? null : new BigDecimal(maximum)); - } - - /** - * Sets allowed maximum value. Coverage ratios are given in the range from - * 0.0 to 1.0. - * - * @param maximum - * allowed maximum or <code>null</code>, if no maximum should be - * checked - */ - public void setMaximum(final BigDecimal maximum) { - this.maximum = maximum; + this.maximum = maximum == null ? null : new BigDecimal(maximum); } String check(final ICoverageNode node) { |