jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1213817 - in /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation: GetDateTest.java NodeMovedTest.java NodeReorderTest.java
Date Tue, 13 Dec 2011 18:18:45 GMT
Author: reschke
Date: Tue Dec 13 18:18:45 2011
New Revision: 1213817

URL: http://svn.apache.org/viewvc?rev=1213817&view=rev
Log:
JCR-3177: Remove jdk 1.4 restriction for jcr-tests

Reduce warning noise on observation tests

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetDateTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeMovedTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeReorderTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetDateTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetDateTest.java?rev=1213817&r1=1213816&r2=1213817&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetDateTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/GetDateTest.java
Tue Dec 13 18:18:45 2011
@@ -32,10 +32,10 @@ import javax.jcr.observation.Event;
 public class GetDateTest extends AbstractObservationTest {
 
     public void testLinearTime() throws RepositoryException {
-        List names = Arrays.asList(new String[]{nodeName1, nodeName2, nodeName3});
-        List dates = new ArrayList();
-        for (Iterator it = names.iterator(); it.hasNext(); ) {
-            final String name = (String) it.next();
+        List<String> names = Arrays.asList(new String[]{nodeName1, nodeName2, nodeName3});
+        List<Long> dates = new ArrayList<Long>();
+        for (Iterator<String> it = names.iterator(); it.hasNext(); ) {
+            final String name = it.next();
             Event[] events = getEvents(new Callable() {
                 public void call() throws RepositoryException {
                     testRootNode.addNode(name, testNodeType);
@@ -52,7 +52,7 @@ public class GetDateTest extends Abstrac
                 // ignore
             }
         }
-        List sortedDates = new ArrayList(dates);
+        List<Long> sortedDates = new ArrayList<Long>(dates);
         Collections.sort(sortedDates);
         assertEquals(sortedDates, dates);
     }

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeMovedTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeMovedTest.java?rev=1213817&r1=1213816&r2=1213817&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeMovedTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeMovedTest.java
Tue Dec 13 18:18:45 2011
@@ -187,7 +187,7 @@ public class NodeMovedTest extends Abstr
             throws RepositoryException {
         checkNodes(events, new String[]{to}, null, Event.NODE_MOVED);
         assertEquals("Wrong number of events", 1, events.length);
-        Map info = events[0].getInfo();
+        Map<?, ?> info = events[0].getInfo();
         checkInfoEntry(info, SRC_ABS_PATH, testRoot + "/" + from);
         checkInfoEntry(info, DEST_ABS_PATH, testRoot + "/" + to);
     }
@@ -201,7 +201,7 @@ public class NodeMovedTest extends Abstr
      * @param key the name of the key.
      * @param expected the expected value.
      */
-    protected void checkInfoEntry(Map info, String key, String expected) {
+    protected void checkInfoEntry(Map<?, ?> info, String key, String expected) {
         String value = (String) info.get(key);
         assertNotNull("Missing event info key: " + key, value);
         assertEquals("Wrong event info value for: " + key, expected, value);

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeReorderTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeReorderTest.java?rev=1213817&r1=1213816&r2=1213817&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeReorderTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/observation/NodeReorderTest.java
Tue Dec 13 18:18:45 2011
@@ -292,7 +292,7 @@ public class NodeReorderTest extends Abs
             throws RepositoryException {
         checkNodes(events, new String[]{dest}, null, Event.NODE_MOVED);
         assertEquals("Wrong number of events", 1, events.length);
-        Map info = events[0].getInfo();
+        Map<?, ?> info = events[0].getInfo();
         checkInfoEntry(info, SRC_CHILD_REL_PATH, src);
         checkInfoEntry(info, DEST_CHILD_REL_PATH, before);
     }
@@ -305,7 +305,7 @@ public class NodeReorderTest extends Abs
      * @param key the name of the key.
      * @param expected the expected value.
      */
-    protected void checkInfoEntry(Map info, String key, String expected) {
+    protected void checkInfoEntry(Map<?, ?> info, String key, String expected) {
         assertTrue("Missing event info key: " + key, info.containsKey(key));
         assertEquals("Wrong event info value for: " + key,
                 expected, (String) info.get(key));



Mime
View raw message