jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r816277 - in /jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version: VersionHistoryImpl.java VersionManager.java
Date Thu, 17 Sep 2009 16:59:13 GMT
Author: reschke
Date: Thu Sep 17 16:59:12 2009
New Revision: 816277

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

Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionHistoryImpl.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java

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=816277&r1=816276&r2=816277&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
Thu Sep 17 16:59:12 2009
@@ -104,7 +104,7 @@
         checkStatus();
         refreshEntry(vhEntry);
         Iterator childIter = vhEntry.getNodeEntries();
-        List versionEntries = new ArrayList();
+        List<NodeEntry> versionEntries = new ArrayList<NodeEntry>();
         // all child-nodes except from jcr:versionLabels point to Versions.
         while (childIter.hasNext()) {
             NodeEntry entry = (NodeEntry) childIter.next();
@@ -124,7 +124,7 @@
         // TODO: improve and use lazy loading of versions as needed.
         // TODO: change session.getNodeByUUID to Session.getNodeByIdentifier as soon as implemented
 
-        List versions = new ArrayList();
+        List<Version> versions = new ArrayList<Version>();
         Version rootV = getRootVersion();
         Node vn = session.getNodeByUUID(getVersionableUUID());
         Version v = vn.getBaseVersion();
@@ -247,7 +247,7 @@
         checkValidVersion(version);
         String vUUID = version.getUUID();
 
-        List vlabels = new ArrayList();
+        List<String> vlabels = new ArrayList<String>();
         Name[] qLabels = getQLabels();
         for (int i = 0; i < qLabels.length; i++) {
             String uuid = getVersionByLabel(qLabels[i]).getUUID();
@@ -255,7 +255,7 @@
                 vlabels.add(session.getNameResolver().getJCRName(qLabels[i]));
             }
         }
-        return (String[]) vlabels.toArray(new String[vlabels.size()]);
+        return vlabels.toArray(new String[vlabels.size()]);
     }
 
     /**
@@ -324,7 +324,7 @@
      */
     private Name[] getQLabels() throws RepositoryException {
         refreshEntry(labelNodeEntry);
-        List labelNames = new ArrayList();
+        List<Name> labelNames = new ArrayList<Name>();
         for (Iterator it = labelNodeEntry.getPropertyEntries(); it.hasNext(); ) {
             PropertyEntry pe = (PropertyEntry) it.next();
             if (! NameConstants.JCR_PRIMARYTYPE.equals(pe.getName()) &&
@@ -332,7 +332,7 @@
                 labelNames.add(pe.getName());
             }
         }
-        return (Name[]) labelNames.toArray(new Name[labelNames.size()]);
+        return labelNames.toArray(new Name[labelNames.size()]);
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java?rev=816277&r1=816276&r2=816277&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/version/VersionManager.java
Thu Sep 17 16:59:12 2009
@@ -172,7 +172,7 @@
      * @see #resolveMergeConflict(NodeState,NodeState,boolean)
      * @see javax.jcr.Node#merge(String, boolean)
      */
-    public Iterator merge(NodeState nodeState, String workspaceName, boolean bestEffort)
throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException,
RepositoryException;
+    public Iterator<NodeId> merge(NodeState nodeState, String workspaceName, boolean
bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException,
InvalidItemStateException, RepositoryException;
 
     /**
      * @param nodeState
@@ -190,7 +190,7 @@
      * @see #resolveMergeConflict(NodeState,NodeState,boolean)
      * @see javax.jcr.Node#merge(String, boolean)
      */
-    public Iterator merge(NodeState nodeState, String workspaceName, boolean bestEffort,
boolean isShallow) throws NoSuchWorkspaceException, AccessDeniedException, MergeException,
LockException, InvalidItemStateException, RepositoryException;
+    public Iterator<NodeId> merge(NodeState nodeState, String workspaceName, boolean
bestEffort, boolean isShallow) throws NoSuchWorkspaceException, AccessDeniedException, MergeException,
LockException, InvalidItemStateException, RepositoryException;
 
 
     /**
@@ -239,7 +239,7 @@
      * @throws UnsupportedRepositoryOperationException
      * @throws RepositoryException
      */
-    public Iterator mergeActivity(NodeState activityState) throws UnsupportedRepositoryOperationException,
RepositoryException;
+    public Iterator<NodeId> mergeActivity(NodeState activityState) throws UnsupportedRepositoryOperationException,
RepositoryException;
 
     /**
      *



Mime
View raw message