From 7e1d5d0a2d4eeebf14b406722a16cb43f6437f1a Mon Sep 17 00:00:00 2001 From: Michal Kordas Date: Sun, 16 Aug 2015 23:10:10 +0200 Subject: [PATCH] Use float in canonical form in test code. #1555 Fixes `ConfusingFloatingPointLiteral` inspection violation in test code. Description: >Reports any floating point numbers which do not have a decimal point, numbers before the decimal point, and numbers after the decimal point. Such literals may be confusing, and violate several coding standards. --- .../com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java index d632059ea..11c83ae28 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/api/AutomaticBeanTest.java @@ -71,7 +71,7 @@ public class AutomaticBeanTest { public void testContextualize_InvocationTargetException() { final TestBean testBean = new TestBean(); DefaultContext context = new DefaultContext(); - context.add("exceptionalMethod", 123f); + context.add("exceptionalMethod", 123.0f); try { testBean.contextualize(context); fail();