jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r816700 - in /jackrabbit/trunk/jackrabbit-jcr2spi/src: main/java/org/apache/jackrabbit/jcr2spi/operation/ main/java/org/apache/jackrabbit/jcr2spi/version/ test/java/org/apache/jackrabbit/jcr2spi/name/ test/java/org/apache/jackrabbit/jcr2spi...
Date Fri, 18 Sep 2009 16:23:13 GMT
Author: reschke
Date: Fri Sep 18 16:23:12 2009
New Revision: 816700

URL: http://svn.apache.org/viewvc?rev=816700&view=rev
Log:
JCR-2087: parametrize generic types

Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/xml/SessionImportTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkin.java
Fri Sep 18 16:23:12 2009
@@ -77,9 +77,9 @@
         } catch (RepositoryException e) {
             log.debug("Failed to access Version history entry -> skip invalidation.",
e);
         }
-        Iterator entries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
+        Iterator<PropertyEntry> entries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
         while (entries.hasNext()) {
-            PropertyEntry pe = (PropertyEntry) entries.next();
+            PropertyEntry pe = entries.next();
             pe.invalidate(false);
         }
         nodeState.getHierarchyEntry().invalidate(false);

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkout.java
Fri Sep 18 16:23:12 2009
@@ -85,9 +85,9 @@
         }
         // non-recursive invalidation (but including all properties)
         NodeEntry nodeEntry = (NodeEntry) nodeState.getHierarchyEntry();
-        Iterator entries = nodeEntry.getPropertyEntries();
+        Iterator<PropertyEntry> entries = nodeEntry.getPropertyEntries();
         while (entries.hasNext()) {
-            PropertyEntry pe = (PropertyEntry) entries.next();
+            PropertyEntry pe = entries.next();
             pe.invalidate(false);
         }
         nodeEntry.invalidate(false);

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Checkpoint.java
Fri Sep 18 16:23:12 2009
@@ -75,9 +75,9 @@
         }
         // non-recursive invalidation (but including all properties)
         NodeEntry nodeEntry = (NodeEntry) nodeState.getHierarchyEntry();
-        Iterator entries = nodeEntry.getPropertyEntries();
+        Iterator<PropertyEntry> entries = nodeEntry.getPropertyEntries();
         while (entries.hasNext()) {
-            PropertyEntry pe = (PropertyEntry) entries.next();
+            PropertyEntry pe = entries.next();
             pe.invalidate(false);
         }
         nodeEntry.invalidate(false);

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockRelease.java
Fri Sep 18 16:23:12 2009
@@ -63,9 +63,9 @@
         status = STATUS_PERSISTED;
         // non-recursive invalidation but including all properties
         NodeEntry nodeEntry = nodeState.getNodeEntry();
-        Iterator entries = nodeEntry.getPropertyEntries();
+        Iterator<PropertyEntry> entries = nodeEntry.getPropertyEntries();
         while (entries.hasNext()) {
-            PropertyEntry pe = (PropertyEntry) entries.next();
+            PropertyEntry pe = entries.next();
             pe.invalidate(false);
         }
         nodeEntry.invalidate(false);

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/RemoveVersion.java
Fri Sep 18 16:23:12 2009
@@ -61,18 +61,18 @@
 
     /**
      * Invalidates the <code>NodeState</code> that has been updated and all
-     * its decendants. Second, the parent state gets invalidated.
+     * its descendants. Second, the parent state gets invalidated.
      *
      * @see Operation#persisted()
      */
     public void persisted() {
         assert status == STATUS_PENDING;
         status = STATUS_PERSISTED;
-        // invaliate the versionable node as well (version related properties)
+        // Invalidate the versionable node as well (version related properties)
         if (versionableEntry != null) {
-            Iterator propEntries = versionableEntry.getPropertyEntries();
+            Iterator<PropertyEntry> propEntries = versionableEntry.getPropertyEntries();
             while (propEntries.hasNext()) {
-                PropertyEntry pe = (PropertyEntry) propEntries.next();
+                PropertyEntry pe = propEntries.next();
                 pe.invalidate(false);
             }
             versionableEntry.invalidate(false);

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/ResolveMergeConflict.java
Fri Sep 18 16:23:12 2009
@@ -69,9 +69,9 @@
         assert status == STATUS_PENDING;
         status = STATUS_PERSISTED;
         // non-recursive invalidation BUT including all properties
-        Iterator propEntries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
+        Iterator<PropertyEntry> propEntries = ((NodeEntry) nodeState.getHierarchyEntry()).getPropertyEntries();
         while (propEntries.hasNext()) {
-            PropertyEntry pe = (PropertyEntry) propEntries.next();
+            PropertyEntry pe = propEntries.next();
             pe.invalidate(false);
         }
         nodeState.getHierarchyEntry().invalidate(false);

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
Fri Sep 18 16:23:12 2009
@@ -103,11 +103,11 @@
     public VersionIterator getAllVersions() throws RepositoryException {
         checkStatus();
         refreshEntry(vhEntry);
-        Iterator childIter = vhEntry.getNodeEntries();
+        Iterator<NodeEntry> childIter = vhEntry.getNodeEntries();
         List<NodeEntry> versionEntries = new ArrayList<NodeEntry>();
         // all child-nodes except from jcr:versionLabels point to Versions.
         while (childIter.hasNext()) {
-            NodeEntry entry = (NodeEntry) childIter.next();
+            NodeEntry entry = childIter.next();
             if (!NameConstants.JCR_VERSIONLABELS.equals(entry.getName())) {
                 versionEntries.add(entry);
             }
@@ -325,8 +325,8 @@
     private Name[] getQLabels() throws RepositoryException {
         refreshEntry(labelNodeEntry);
         List<Name> labelNames = new ArrayList<Name>();
-        for (Iterator it = labelNodeEntry.getPropertyEntries(); it.hasNext(); ) {
-            PropertyEntry pe = (PropertyEntry) it.next();
+        for (Iterator<PropertyEntry> it = labelNodeEntry.getPropertyEntries(); it.hasNext();
) {
+            PropertyEntry pe = it.next();
             if (! NameConstants.JCR_PRIMARYTYPE.equals(pe.getName()) &&
                 ! NameConstants.JCR_MIXINTYPES.equals(pe.getName())) {
                 labelNames.add(pe.getName());

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/name/NamespaceRegistryTest.java
Fri Sep 18 16:23:12 2009
@@ -66,7 +66,7 @@
     }
 
     /**
-     * Test if a new registred namespace is immediately visible through another
+     * Test if a new registered namespace is immediately visible through another
      * session object.
      *
      * @throws RepositoryException
@@ -194,7 +194,7 @@
      * @return an unused namespace prefix.
      */
     private String getUnusedPrefix() throws RepositoryException {
-        Set prefixes = new HashSet(Arrays.asList(nsRegistry.getPrefixes()));
+        Set<String> prefixes = new HashSet<String>(Arrays.asList(nsRegistry.getPrefixes()));
         String prefix = TEST_PREFIX;
         int i = 0;
         while (prefixes.contains(prefix)) {
@@ -209,7 +209,7 @@
      * @return an unused namespace URI.
      */
     private String getUnusedURI() throws RepositoryException {
-        Set uris = new HashSet(Arrays.asList(nsRegistry.getURIs()));
+        Set<String> uris = new HashSet<String>(Arrays.asList(nsRegistry.getURIs()));
         String uri = TEST_URI;
         int i = 0;
         while (uris.contains(uri)) {

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/query/QueryTest.java
Fri Sep 18 16:23:12 2009
@@ -35,11 +35,11 @@
      * @throws NotExecutableException 
      */
     public void testQueryChildNodesOfRoot() throws RepositoryException, NotExecutableException
{
-        List nodes = new ArrayList();
+        List<Node> nodes = new ArrayList<Node>();
         for (NodeIterator it = superuser.getRootNode().getNodes(); it.hasNext(); ) {
             nodes.add(it.nextNode());
         }
-        Node[] children = (Node[]) nodes.toArray(new Node[nodes.size()]);
+        Node[] children = nodes.toArray(new Node[nodes.size()]);
         executeXPathQuery(superuser, "/jcr:root/*", children);
     }
 

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/xml/SessionImportTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/xml/SessionImportTest.java?rev=816700&r1=816699&r2=816700&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/xml/SessionImportTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/xml/SessionImportTest.java
Fri Sep 18 16:23:12 2009
@@ -204,7 +204,7 @@
     private static String getUnknownURI(Session session, String uriHint) throws RepositoryException
{
         String uri = uriHint;
         int index = 0;
-        List uris = Arrays.asList(session.getWorkspace().getNamespaceRegistry().getURIs());
+        List<String> uris = Arrays.asList(session.getWorkspace().getNamespaceRegistry().getURIs());
         while (uris.contains(uri)) {
             uri = uriHint + index;
             index++;



Mime
View raw message