commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r755573 - in /commons/proper/lang/trunk/src/test/org/apache/commons/lang/time: DateUtilsTest.java DurationFormatUtilsTest.java
Date Wed, 18 Mar 2009 12:05:47 GMT
Author: sebb
Date: Wed Mar 18 12:05:47 2009
New Revision: 755573

URL: http://svn.apache.org/viewvc?rev=755573&view=rev
Log:
Generics

Modified:
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java?rev=755573&r1=755572&r2=755573&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateUtilsTest.java Wed
Mar 18 12:05:47 2009
@@ -159,7 +159,7 @@
     //-----------------------------------------------------------------------
     public void testConstructor() {
         assertNotNull(new DateUtils());
-        Constructor[] cons = DateUtils.class.getDeclaredConstructors();
+        Constructor<?>[] cons = DateUtils.class.getDeclaredConstructors();
         assertEquals(1, cons.length);
         assertEquals(true, Modifier.isPublic(cons[0].getModifiers()));
         assertEquals(true, Modifier.isPublic(DateUtils.class.getModifiers()));
@@ -1201,7 +1201,7 @@
             Calendar centered = DateUtils.truncate(now, Calendar.DATE);
             centered.add(Calendar.DATE, -3);
             
-            Iterator it = DateUtils.iterator(now, DateUtils.RANGE_WEEK_SUNDAY);
+            Iterator<?> it = DateUtils.iterator(now, DateUtils.RANGE_WEEK_SUNDAY);
             assertWeekIterator(it, sunday);
             it = DateUtils.iterator(now, DateUtils.RANGE_WEEK_MONDAY);
             assertWeekIterator(it, monday);
@@ -1232,7 +1232,7 @@
      * Tests the calendar iterator for month-based ranges
      */
     public void testMonthIterator() throws Exception {
-        Iterator it = DateUtils.iterator(date1, DateUtils.RANGE_MONTH_SUNDAY);
+        Iterator<?> it = DateUtils.iterator(date1, DateUtils.RANGE_MONTH_SUNDAY);
         assertWeekIterator(it,
                 dateParser.parse("January 27, 2002"),
                 dateParser.parse("March 2, 2002"));
@@ -1257,7 +1257,7 @@
      * This checks that this is a 7 element iterator of Calendar objects
      * that are dates (no time), and exactly 1 day spaced after each other.
      */
-    private static void assertWeekIterator(Iterator it, Calendar start) {
+    private static void assertWeekIterator(Iterator<?> it, Calendar start) {
         Calendar end = (Calendar) start.clone();
         end.add(Calendar.DATE, 6);
 
@@ -1267,7 +1267,7 @@
     /**
      * Convenience method for when working with Date objects
      */
-    private static void assertWeekIterator(Iterator it, Date start, Date end) {
+    private static void assertWeekIterator(Iterator<?> it, Date start, Date end) {
         Calendar calStart = Calendar.getInstance();
         calStart.setTime(start);
         Calendar calEnd = Calendar.getInstance();
@@ -1281,7 +1281,7 @@
      * that are dates (no time), and exactly 1 day spaced after each other
      * (in addition to the proper start and stop dates)
      */
-    private static void assertWeekIterator(Iterator it, Calendar start, Calendar end) {
+    private static void assertWeekIterator(Iterator<?> it, Calendar start, Calendar
end) {
         Calendar cal = (Calendar) it.next();
         assertEquals("", start, cal, 0);
         Calendar last = null;

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java?rev=755573&r1=755572&r2=755573&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
Wed Mar 18 12:05:47 2009
@@ -55,7 +55,7 @@
     // -----------------------------------------------------------------------
     public void testConstructor() {
         assertNotNull(new DurationFormatUtils());
-        Constructor[] cons = DurationFormatUtils.class.getDeclaredConstructors();
+        Constructor<?>[] cons = DurationFormatUtils.class.getDeclaredConstructors();
         assertEquals(1, cons.length);
         assertEquals(true, Modifier.isPublic(cons[0].getModifiers()));
         assertEquals(true, Modifier.isPublic(DurationFormatUtils.class.getModifiers()));



Mime
View raw message