jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1221255 - in /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test: AbstractJCRTest.java JCRTestResult.java
Date Tue, 20 Dec 2011 13:35:29 GMT
Author: reschke
Date: Tue Dec 20 13:35:29 2011
New Revision: 1221255

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

Reduce warning noise

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestResult.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java?rev=1221255&r1=1221254&r2=1221255&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/AbstractJCRTest.java
Tue Dec 20 13:35:29 2011
@@ -611,7 +611,7 @@ public abstract class AbstractJCRTest ex
      * @throws RepositoryException if an error occurs.
      */
     protected String getNonExistingWorkspaceName(Session session) throws RepositoryException
{
-        List names = Arrays.asList(session.getWorkspace().getAccessibleWorkspaceNames());
+        List<String> names = Arrays.asList(session.getWorkspace().getAccessibleWorkspaceNames());
         String nonExisting = null;
         while (nonExisting == null) {
             String name = createRandomString(10);

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestResult.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestResult.java?rev=1221255&r1=1221254&r2=1221255&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestResult.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/JCRTestResult.java
Tue Dec 20 13:35:29 2011
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.test;
 
+import junit.framework.TestFailure;
 import junit.framework.TestResult;
 import junit.framework.Test;
 import junit.framework.AssertionFailedError;
@@ -43,13 +44,13 @@ public class JCRTestResult extends TestR
      * Set of Strings that identify the test methods that currently fails but
      * are recognized as known issues. Those will not be reported as errors.
      */
-    private final Set knownIssues;
+    private final Set<String> knownIssues;
 
     /**
      * Set of Strings that identify the test methods that are listed as known
      * issues but whose test failures should still be reported.
      */
-    private final Set knownIssuesOverride;
+    private final Set<String> knownIssuesOverride;
 
     /**
      * Creates a new JCRTestResult that delegates to <code>orig</code>.
@@ -111,7 +112,7 @@ public class JCRTestResult extends TestR
         return orig.errorCount();
     }
 
-    public synchronized Enumeration errors() {
+    public synchronized Enumeration<TestFailure> errors() {
         return orig.errors();
     }
 
@@ -119,7 +120,7 @@ public class JCRTestResult extends TestR
         return orig.failureCount();
     }
 
-    public synchronized Enumeration failures() {
+    public synchronized Enumeration<TestFailure> failures() {
         return orig.failures();
     }
 
@@ -153,8 +154,8 @@ public class JCRTestResult extends TestR
      * @param name name of the system property
      * @return set of string tokens
      */
-    private static Set tokenize(String name) {
-        Set tokens = new HashSet();
+    private static Set<String> tokenize(String name) {
+        Set<String> tokens = new HashSet<String>();
         StringTokenizer tokenizer =
             new StringTokenizer(System.getProperty(name, ""));
         while (tokenizer.hasMoreTokens()) {
@@ -180,7 +181,7 @@ public class JCRTestResult extends TestR
      * @return <code>true</code> if the test case name is included,
      *         <code>false</code> otherwise
      */
-    private static boolean contains(Set tokens, TestCase test) {
+    private static boolean contains(Set<String> tokens, TestCase test) {
         String className = test.getClass().getName();
         String methodName = test.getName();
 



Mime
View raw message