commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Fwd: [lang] Ignore deprecations in test code
Date Tue, 03 Nov 2015 18:27:52 GMT
Nice one!

Gary
---------- Forwarded message ----------
From: <sebb@apache.org>
Date: Tue, Nov 3, 2015 at 2:20 AM
Subject: [lang] Ignore deprecations in test code
To: commits@commons.apache.org


Repository: commons-lang
Updated Branches:
  refs/heads/master 47c186298 -> 94184ce38


Ignore deprecations in test code

Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/94184ce3
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/94184ce3
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/94184ce3

Branch: refs/heads/master
Commit: 94184ce3837e4268f3d0a7459f90e6bb920dd54a
Parents: 47c1862
Author: Sebb <sebb@apache.org>
Authored: Tue Nov 3 10:20:28 2015 +0000
Committer: Sebb <sebb@apache.org>
Committed: Tue Nov 3 10:20:28 2015 +0000

----------------------------------------------------------------------
 .../java/org/apache/commons/lang3/time/DateFormatUtilsTest.java     | 1 +
 .../java/org/apache/commons/lang3/time/DateUtilsRoundingTest.java   | 1 +
 src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java      | 1 +
 .../java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java | 1 +
 .../java/org/apache/commons/lang3/time/FastDatePrinterTest.java     | 1 +
 5 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/94184ce3/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
----------------------------------------------------------------------
diff --git
a/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
b/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
index 5300e7b..a9a4d25 100644
--- a/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
@@ -37,6 +37,7 @@ import org.junit.Test;
 /**
  * TestCase for DateFormatUtils.
  */
+@SuppressWarnings("deprecation") // tests lots of deprecated items
 public class DateFormatUtilsTest {

     @Rule

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/94184ce3/src/test/java/org/apache/commons/lang3/time/DateUtilsRoundingTest.java
----------------------------------------------------------------------
diff --git
a/src/test/java/org/apache/commons/lang3/time/DateUtilsRoundingTest.java
b/src/test/java/org/apache/commons/lang3/time/DateUtilsRoundingTest.java
index bfe7a12..e5b8ef9 100644
--- a/src/test/java/org/apache/commons/lang3/time/DateUtilsRoundingTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/DateUtilsRoundingTest.java
@@ -51,6 +51,7 @@ public class DateUtilsRoundingTest {
     Date targetMilliSecondDate;

     Calendar januaryOneCalendar;
+    @SuppressWarnings("deprecation")
     FastDateFormat fdf = DateFormatUtils.ISO_DATETIME_FORMAT;



http://git-wip-us.apache.org/repos/asf/commons-lang/blob/94184ce3/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
index 7b4b721..ecf4bb6 100644
--- a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java
@@ -1203,6 +1203,7 @@ public class DateUtilsTest {
     }

     // http://issues.apache.org/jira/browse/LANG-530
+    @SuppressWarnings("deprecation")
     @Test
     public void testLang530() throws ParseException {
         final Date d = new Date();

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/94184ce3/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java
----------------------------------------------------------------------
diff --git
a/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java
b/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java
index eb469ea..2847c6d 100644
---
a/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java
+++
b/src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java
@@ -253,6 +253,7 @@ public class DurationFormatUtilsTest {
         DurationFormatUtils.formatDuration(-5000, "S", true);
     }

+    @SuppressWarnings("deprecation")
     @Test
     public void testFormatPeriodISO() {
         final TimeZone timeZone = TimeZone.getTimeZone("GMT-3");

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/94184ce3/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
----------------------------------------------------------------------
diff --git
a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
index 0727486..5de68d6 100644
--- a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
+++ b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java
@@ -382,6 +382,7 @@ public class FastDatePrinterTest {
         assertEquals("11 23 23 11", printer.format(calendar));
     }

+    @SuppressWarnings("deprecation")
     @Test
     public void testStringBufferOptions() {
         final DatePrinter format = getInstance("yyyy-MM-dd HH:mm:ss.SSS
Z", TimeZone.getTimeZone("GMT"));




-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message