This is an automated email from the ASF dual-hosted git repository. fschumacher pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jmeter.git
commit f475f17c909500995e91bb64191468d6d04c18b0 Author: Felix Schumacher <[email protected]> AuthorDate: Sun Feb 21 10:24:47 2021 +0100 Silence warnings of ErrorProne about usage of Date in test methods We know Date is obsolete, but those types are part of the API and can't be removed easily. Comparison with equals should be safe in these test methods, too. We are comparing *real* Dates. --- src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java b/src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java index 53f923f..4d81209 100644 --- a/src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java +++ b/src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java @@ -65,18 +65,21 @@ public class TestConverter { } @Test + @SuppressWarnings({ "UndefinedEquals", "JdkObsolete" }) public void testGetDateObjectDateWithTimeAndNullDefault() { Date time = new Date(); assertEquals(time, Converter.getDate(time, null)); } @Test + @SuppressWarnings({ "UndefinedEquals", "JdkObsolete" }) public void testGetDateObjectDateWithNullAndDateAsDefault() { Date date = new Date(); assertEquals(date, Converter.getDate(null, date)); } @Test + @SuppressWarnings("UndefinedEquals") public void testGetDateObjectDateWithValidStringAndNullDefault() { Calendar cal = new GregorianCalendar(); cal.set(Calendar.HOUR_OF_DAY, 0);
