jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1214709 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/ExportDocViewTest.java
Date Thu, 15 Dec 2011 11:30:37 GMT
Author: reschke
Date: Thu Dec 15 11:30:37 2011
New Revision: 1214709

URL: http://svn.apache.org/viewvc?rev=1214709&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/api/ExportDocViewTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/ExportDocViewTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/ExportDocViewTest.java?rev=1214709&r1=1214708&r2=1214709&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/ExportDocViewTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/ExportDocViewTest.java
Thu Dec 15 11:30:37 2011
@@ -46,11 +46,12 @@ import javax.jcr.PropertyType;
 import javax.jcr.PropertyIterator;
 import javax.jcr.Value;
 
+import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.Stack;
 import java.util.ArrayList;
-import java.util.Properties;
-import java.util.Enumeration;
 import java.io.File;
 import java.io.IOException;
 import java.io.BufferedOutputStream;
@@ -588,11 +589,11 @@ public class ExportDocViewTest extends A
      */
     private void compareNamespaces(Element root) throws RepositoryException {
 
-        Properties nameSpaces = new AttributeSeparator(root).getNsAttrs();
+        Map<String, String> nameSpaces = new AttributeSeparator(root).getNsAttrs();
         // check if all namespaces exist that were exported
-        for (Enumeration e = nameSpaces.keys(); e.hasMoreElements();) {
-            String prefix = (String) e.nextElement();
-            String URI = nameSpaces.getProperty(prefix);
+        for (Iterator<String> e = nameSpaces.keySet().iterator(); e.hasNext(); ) {
+            String prefix = e.next();
+            String URI = nameSpaces.get(prefix);
 
             assertEquals("Prefix of uri" + URI + "is not exported correctly.",
                     nsr.getPrefix(URI), prefix);
@@ -1120,22 +1121,22 @@ public class ExportDocViewTest extends A
 
         Element elem;
         NamedNodeMap attrs;
-        Properties nsAttrs;
-        Properties nonNsAttrs;
+        Map<String, String> nsAttrs;
+        Map<String, String> nonNsAttrs;
 
         AttributeSeparator(Element elem) {
             this.elem = elem;
-            nsAttrs = new Properties();
-            nonNsAttrs = new Properties();
+            nsAttrs = new HashMap<String, String>();
+            nonNsAttrs = new HashMap<String, String>();
             attrs = elem.getAttributes();
             separateAttrs();
         }
 
-        public Properties getNsAttrs() {
+        public Map<String, String> getNsAttrs() {
             return nsAttrs;
         }
 
-        public Properties getNonNsAttrs() {
+        public Map<String, String> getNonNsAttrs() {
             return nonNsAttrs;
         }
 



Mime
View raw message