diff --git a/allure-notifications-api/src/main/java/guru/qa/allure/notifications/formatters/Formatters.java b/allure-notifications-api/src/main/java/guru/qa/allure/notifications/formatters/Formatters.java index 08438854..d410cdbf 100644 --- a/allure-notifications-api/src/main/java/guru/qa/allure/notifications/formatters/Formatters.java +++ b/allure-notifications-api/src/main/java/guru/qa/allure/notifications/formatters/Formatters.java @@ -6,8 +6,6 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.time.DurationFormatUtils; -import java.text.*; - /** * @author kadehar * @since 4.0 @@ -38,20 +36,6 @@ public static String formatDuration(Long durationMillis, String format) { return formattedDuration; } - public static double formatDouble(double value) { - log.info("Formatting value {}", value); - DecimalFormat df = new DecimalFormat("##.#"); - String tmp = df.format(value); - NumberFormat numberFormat = NumberFormat.getInstance(); - try { - double result = numberFormat.parse(tmp).doubleValue(); - log.info("Formatted value is {}", result); - return result; - } catch (ParseException e) { - return 0.0; - } - } - public static String formatReportLink(String link) { return link != null && link.endsWith("/") ? link + "allure" : link; } diff --git a/allure-notifications-api/src/main/java/guru/qa/allure/notifications/util/Percentage.java b/allure-notifications-api/src/main/java/guru/qa/allure/notifications/util/Percentage.java index 61101c17..b45a370a 100644 --- a/allure-notifications-api/src/main/java/guru/qa/allure/notifications/util/Percentage.java +++ b/allure-notifications-api/src/main/java/guru/qa/allure/notifications/util/Percentage.java @@ -1,6 +1,5 @@ package guru.qa.allure.notifications.util; -import guru.qa.allure.notifications.formatters.Formatters; import lombok.extern.slf4j.Slf4j; /** @@ -13,7 +12,6 @@ public class Percentage { public double eval(int result, int total) { log.info("Calculate percentage for result {} by total {}", result, total); - double value = (result * 100.00) / total; - return Formatters.formatDouble(value); + return (result * 100.00) / total; } } diff --git a/allure-notifications-api/src/main/resources/templates/html.ftl b/allure-notifications-api/src/main/resources/templates/html.ftl index b2dd78c8..e8a890e2 100644 --- a/allure-notifications-api/src/main/resources/templates/html.ftl +++ b/allure-notifications-api/src/main/resources/templates/html.ftl @@ -5,8 +5,8 @@ ${phrases.scenario.duration}: ${time}
${phrases.scenario.totalScenarios}: ${total}