jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r794641 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: ./ cluster/ journal/ observation/
Date Thu, 16 Jul 2009 11:55:39 GMT
Author: thomasm
Date: Thu Jul 16 11:55:39 2009
New Revision: 794641

URL: http://svn.apache.org/viewvc?rev=794641&view=rev
Log:
JCR-2087 Upgrade to Java 5 as the base platform

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ChangeLogRecord.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventChannel.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventListener.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/Update.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceListener.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceRecord.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/InstanceRevision.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Journal.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MSSqlDatabaseJournal.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/RotatingLogFile.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventJournalImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventListenerIteratorImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java Thu Jul 16 11:55:39 2009
@@ -259,14 +259,14 @@
             ((NodeImpl) getParent()).removeChildProperty(((PropertyId) id).getName());
             return;
         }
-        ArrayList list = new ArrayList();
+        ArrayList<InternalValue> list = new ArrayList<InternalValue>();
         // compact array (purge null entries)
-        for (int i = 0; i < values.length; i++) {
-            if (values[i] != null) {
-                list.add(values[i]);
+        for (InternalValue v : values) {
+            if (v != null) {
+                list.add(v);
             }
         }
-        values = (InternalValue[]) list.toArray(new InternalValue[list.size()]);
+        values = list.toArray(new InternalValue[list.size()]);
 
         // modify the state of this property
         PropertyState thisState = (PropertyState) getOrCreateTransientItemState();
@@ -474,7 +474,7 @@
     }
 
     public InputStream getStream() throws RepositoryException {
-        return getValue().getStream();
+        return getValue().getBinary().getStream();
     }
 
     public long getLong() throws RepositoryException {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ChangeLogRecord.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ChangeLogRecord.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ChangeLogRecord.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ChangeLogRecord.java Thu Jul 16 11:55:39 2009
@@ -99,7 +99,7 @@
     /**
      * List of <code>EventState</code>s.
      */
-    private List events;
+    private List<EventState> events;
 
     /**
      * The user data.
@@ -126,7 +126,7 @@
      * @param timestamp when the changes for this record were persisted.
      * @param userData the user data associated with these changes.
      */
-    public ChangeLogRecord(ChangeLog changes, List events,
+    public ChangeLogRecord(ChangeLog changes, List<EventState> events,
                            Record record, String workspace,
                            long timestamp, String userData) {
         super(record, workspace);
@@ -149,7 +149,7 @@
 
         this.identifier = identifier;
         this.changes = new ChangeLog();
-        this.events = new ArrayList();
+        this.events = new ArrayList<EventState>();
     }
 
     /**
@@ -276,16 +276,16 @@
         Path.Element childRelPath = record.readPathElement();
         Name ntName = record.readQName();
 
-        Set mixins = new HashSet();
+        Set<Name> mixins = new HashSet<Name>();
         int mixinCount = record.readInt();
         for (int i = 0; i < mixinCount; i++) {
             mixins.add(record.readQName());
         }
         String userId = record.readString();
 
-        Map info = null;
+        Map<String, InternalValue> info = null;
         if (type == Event.NODE_MOVED) {
-            info = new HashMap();
+            info = new HashMap<String, InternalValue>();
             // read info map
             int infoSize = record.readInt();
             for (int i = 0; i < infoSize; i++) {
@@ -325,7 +325,7 @@
      */
     private EventState createEventState(int type, NodeId parentId, Path parentPath,
                                         NodeId childId, Path.Element childRelPath,
-                                        Name ntName, Set mixins, String userId) {
+                                        Name ntName, Set<Name> mixins, String userId) {
         switch (type) {
             case Event.NODE_ADDED:
                 return EventState.childNodeAdded(parentId, parentPath, childId, childRelPath,
@@ -392,9 +392,7 @@
             }
         }
 
-        Iterator iter = events.iterator();
-        while (iter.hasNext()) {
-            EventState event = (EventState) iter.next();
+        for (EventState event : events) {
             writeEventRecord(event);
         }
     }
@@ -466,22 +464,21 @@
         record.writePathElement(event.getChildRelPath());
         record.writeQName(event.getNodeType());
 
-        Set mixins = event.getMixinNames();
+        Set<Name> mixins = event.getMixinNames();
         record.writeInt(mixins.size());
-        Iterator iter = mixins.iterator();
+        Iterator<Name> iter = mixins.iterator();
         while (iter.hasNext()) {
-            record.writeQName((Name) iter.next());
+            record.writeQName(iter.next());
         }
         record.writeString(event.getUserId());
 
         if (event.getType() == Event.NODE_MOVED) {
             // write info map
-            Map info = event.getInfo();
+            Map<String, InternalValue> info = event.getInfo();
             record.writeInt(info.size());
-            for (Iterator it = info.entrySet().iterator(); it.hasNext(); ) {
-                Map.Entry entry = (Map.Entry) it.next();
-                String key = (String) entry.getKey();
-                InternalValue value = (InternalValue) entry.getValue();
+            for (Map.Entry<String, InternalValue> entry : info.entrySet()) {
+                String key = entry.getKey();
+                InternalValue value = entry.getValue();
                 record.writeString(key);
                 if (value == null) {
                     // use undefined for null value
@@ -515,7 +512,7 @@
      *
      * @return events
      */
-    public List getEvents() {
+    public List<EventState> getEvents() {
         return Collections.unmodifiableList(events);
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java Thu Jul 16 11:55:39 2009
@@ -41,6 +41,7 @@
 import org.apache.jackrabbit.core.journal.RecordProducer;
 import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
 import org.apache.jackrabbit.core.nodetype.NodeTypeDef;
+import org.apache.jackrabbit.core.observation.EventState;
 import org.apache.jackrabbit.core.state.ChangeLog;
 import org.apache.jackrabbit.core.xml.ClonedInputSource;
 import org.slf4j.Logger;
@@ -138,7 +139,7 @@
      * @since Apache Jackrabbit 1.6
      * @see <a href="https://issues.apache.org/jira/browse/JCR-1753">JCR-1753</a>
      */
-    private volatile int syncCount = 0;
+    private volatile int syncCount;
 
     /**
      * Status flag, one of {@link #NONE}, {@link #STARTED} or {@link #STOPPED}.
@@ -148,12 +149,12 @@
     /**
      * Map of available lock listeners, indexed by workspace name.
      */
-    private final Map wspLockListeners = new HashMap();
+    private final Map<String, LockEventListener> wspLockListeners = new HashMap<String, LockEventListener>();
 
     /**
      * Map of available update listeners, indexed by workspace name.
      */
-    private final Map wspUpdateListeners = new HashMap();
+    private final Map<String, UpdateEventListener> wspUpdateListeners = new HashMap<String, UpdateEventListener>();
 
     /**
      * Versioning update listener.
@@ -169,7 +170,7 @@
      * Create workspace listener
      */
     private WorkspaceListener createWorkspaceListener;
-    
+
     /**
      * Node type listener.
      */
@@ -625,7 +626,7 @@
                 return;
             }
 
-            List events = update.getEvents();
+            List<EventState> events = update.getEvents();
             ChangeLog changes = update.getChanges();
             boolean succeeded = false;
 
@@ -840,7 +841,7 @@
 
         UpdateEventListener listener = null;
         if (workspace != null) {
-            listener = (UpdateEventListener) wspUpdateListeners.get(workspace);
+            listener = wspUpdateListeners.get(workspace);
             if (listener == null) {
                 try {
                     clusterContext.updateEventsReady(workspace);
@@ -849,7 +850,7 @@
                             workspace + " online: " + e.getMessage();
                     log.warn(msg);
                 }
-                listener = (UpdateEventListener) wspUpdateListeners.get(workspace);
+                listener = wspUpdateListeners.get(workspace);
                 if (listener ==  null) {
                     String msg = "Update listener unavailable for workspace: " + workspace;
                     log.error(msg);
@@ -883,7 +884,7 @@
     public void process(LockRecord record) {
         String workspace = record.getWorkspace();
 
-        LockEventListener listener = (LockEventListener) wspLockListeners.get(workspace);
+        LockEventListener listener = wspLockListeners.get(workspace);
         if (listener == null) {
             try {
                 clusterContext.lockEventsReady(workspace);
@@ -892,7 +893,7 @@
                         workspace + " online: " + e.getMessage();
                 log.warn(msg);
             }
-            listener = (LockEventListener) wspLockListeners.get(workspace);
+            listener = wspLockListeners.get(workspace);
             if (listener ==  null) {
                 String msg = "Lock channel unavailable for workspace: " + workspace;
                 log.error(msg);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterRecordProcessor.java Thu Jul 16 11:55:39 2009
@@ -30,33 +30,33 @@
      *
      * @param record change log record
      */
-    public void process(ChangeLogRecord record);
+    void process(ChangeLogRecord record);
 
     /**
      * Process a lock record.
      *
      * @param record lock record
      */
-    public void process(LockRecord record);
+    void process(LockRecord record);
 
     /**
      * Process a namespace record.
      *
      * @param record namespace record
      */
-    public void process(NamespaceRecord record);
+    void process(NamespaceRecord record);
 
     /**
      * Process a node type record
      *
      * @param record node type record
      */
-    public void process(NodeTypeRecord record);
+    void process(NodeTypeRecord record);
 
     /**
      * Process a workspace record
      * @param record workspace record
      */
-    public void process(WorkspaceRecord record);
+    void process(WorkspaceRecord record);
 
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventChannel.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventChannel.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventChannel.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventChannel.java Thu Jul 16 11:55:39 2009
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.core.cluster;
 
 import org.apache.jackrabbit.core.nodetype.NodeTypeDef;
+import org.apache.jackrabbit.spi.Name;
 
 import java.util.Collection;
 
@@ -30,7 +31,7 @@
      *
      * @param ntDefs collection of node type definitions
      */
-    void registered(Collection ntDefs);
+    void registered(Collection<NodeTypeDef> ntDefs);
 
     /**
      * Called when a node types has been re-registered.
@@ -44,7 +45,7 @@
      *
      * @param ntNames collection of node type qnames
      */
-    void unregistered(Collection ntNames);
+    void unregistered(Collection<Name> ntNames);
 
     /**
      * Set listener that will receive information about incoming, external node type events.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventListener.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventListener.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/NodeTypeEventListener.java Thu Jul 16 11:55:39 2009
@@ -18,6 +18,7 @@
 
 import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
 import org.apache.jackrabbit.core.nodetype.NodeTypeDef;
+import org.apache.jackrabbit.spi.Name;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
@@ -35,7 +36,7 @@
      * @throws RepositoryException if an error occurs
      * @throws InvalidNodeTypeDefException if the node type definition is invalid
      */
-    void externalRegistered(Collection ntDefs)
+    void externalRegistered(Collection<NodeTypeDef> ntDefs)
         throws RepositoryException, InvalidNodeTypeDefException;
 
     /**
@@ -56,7 +57,7 @@
      * @throws RepositoryException if an error occurs
      * @throws NoSuchNodeTypeException if a node type is already unregistered
      */
-    void externalUnregistered(Collection ntNames)
+    void externalUnregistered(Collection<Name> ntNames)
         throws RepositoryException, NoSuchNodeTypeException;
 
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/Update.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/Update.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/Update.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/Update.java Thu Jul 16 11:55:39 2009
@@ -18,6 +18,7 @@
 
 import java.util.List;
 
+import org.apache.jackrabbit.core.observation.EventState;
 import org.apache.jackrabbit.core.state.ChangeLog;
 
 /**
@@ -55,7 +56,7 @@
      *
      * @return collection of <code>EventState</code>s
      */
-    List getEvents();
+    List<EventState> getEvents();
 
     /**
      * Returns the timestamp whe this update occured.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceListener.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceListener.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceListener.java Thu Jul 16 11:55:39 2009
@@ -27,12 +27,12 @@
 
     /**
      * Workspace created on another cluster node.
-     * 
+     *
      * @param workspaceName
      * @param configTemplate
      * @throws RepositoryException
      */
-    public void externalWorkspaceCreated(String workspaceName,
+    void externalWorkspaceCreated(String workspaceName,
             InputSource configTemplate) throws RepositoryException;
 
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceRecord.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceRecord.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceRecord.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceRecord.java Thu Jul 16 11:55:39 2009
@@ -44,7 +44,7 @@
     /**
      * Base workspace action
      */
-    public static abstract class Action {
+    public abstract static class Action {
         abstract int getType();
 
         abstract void write(Record record) throws JournalException;
@@ -57,8 +57,8 @@
      */
     static final class CreateWorkspaceAction extends Action {
         private InputSource inputSource;
-        private char charArray[];
-        private byte byteArray[];
+        private char[] charArray;
+        private byte[] byteArray;
 
         int getType() {
             return CREATE_WORKSPACE_ACTION_TYPE;
@@ -127,7 +127,7 @@
 
     /**
      * Creates a new {@link WorkspaceRecord} for create workspace action.
-     * 
+     *
      * @param workspace
      *            workspace name
      * @param inputSource
@@ -144,7 +144,7 @@
 
     /**
      * Creates a new empty {@link WorkspaceRecord}.
-     * 
+     *
      * @param record
      */
     protected WorkspaceRecord(Record record) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java Thu Jul 16 11:55:39 2009
@@ -16,19 +16,19 @@
  */
 package org.apache.jackrabbit.core.journal;
 
-import EDU.oswego.cs.dl.util.concurrent.ReadWriteLock;
-import EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock;
+import java.io.File;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.jackrabbit.spi.commons.conversion.DefaultNamePathResolver;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.File;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
+import EDU.oswego.cs.dl.util.concurrent.ReadWriteLock;
+import EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock;
 
 /**
  * Base journal implementation.
@@ -58,12 +58,12 @@
     /**
      * Map of registered consumers.
      */
-    private final Map consumers = new HashMap();
+    private final Map<String, RecordConsumer> consumers = new HashMap<String, RecordConsumer>();
 
     /**
      * Map of registered producers.
      */
-    private final Map producers = new HashMap();
+    private final Map<String, RecordProducer> producers = new HashMap<String, RecordProducer>();
 
     /**
      * Journal lock, allowing multiple readers (synchronizing their contents)
@@ -128,7 +128,7 @@
      */
     public RecordConsumer getConsumer(String identifier) {
         synchronized (consumers) {
-            return (RecordConsumer) consumers.get(identifier);
+            return consumers.get(identifier);
         }
     }
 
@@ -137,7 +137,7 @@
      */
     public RecordProducer getProducer(String identifier) {
         synchronized (producers) {
-            RecordProducer producer = (RecordProducer) producers.get(identifier);
+            RecordProducer producer = producers.get(identifier);
             if (producer == null) {
                 producer = createProducer(identifier);
                 producers.put(identifier, producer);
@@ -163,9 +163,7 @@
         long minimalRevision = Long.MAX_VALUE;
 
         synchronized (consumers) {
-            Iterator iter = consumers.values().iterator();
-            while (iter.hasNext()) {
-                RecordConsumer consumer = (RecordConsumer) iter.next();
+            for (RecordConsumer consumer : consumers.values()) {
                 if (consumer.getRevision() < minimalRevision) {
                     minimalRevision = consumer.getRevision();
                 }
@@ -225,9 +223,7 @@
         }
 
         if (stopRevision > 0) {
-            Iterator iter = consumers.values().iterator();
-            while (iter.hasNext()) {
-                RecordConsumer consumer = (RecordConsumer) iter.next();
+            for (RecordConsumer consumer : consumers.values()) {
                 consumer.setRevision(stopRevision);
             }
             log.info("Synchronized to revision: " + stopRevision);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java Thu Jul 16 11:55:39 2009
@@ -176,14 +176,14 @@
      * Statement returning the local revision of this cluster node.
      */
     private PreparedStatement getLocalRevisionStmt;
-    
+
     /**
-     * Statement for inserting the local revision of this cluster node. 
+     * Statement for inserting the local revision of this cluster node.
      */
     private PreparedStatement insertLocalRevisionStmt;
-    
+
     /**
-     * Statement for updating the local revision of this cluster node. 
+     * Statement for updating the local revision of this cluster node.
      */
     private PreparedStatement updateLocalRevisionStmt;
 
@@ -205,7 +205,7 @@
     /**
      * Whether the revision table janitor thread is enabled.
      */
-    private boolean janitorEnabled = false;
+    private boolean janitorEnabled;
 
     /**
      * The sleep time of the revision table janitor in seconds, 1 day default.
@@ -260,19 +260,19 @@
      * SQL statement removing a set of revisions with from the journal table.
      */
     protected String cleanRevisionStmtSQL;
-    
+
     /**
      * SQL statement returning the local revision of this cluster node.
      */
     protected String getLocalRevisionStmtSQL;
-    
+
     /**
-     * SQL statement for inserting the local revision of this cluster node. 
+     * SQL statement for inserting the local revision of this cluster node.
      */
     protected String insertLocalRevisionStmtSQL;
 
     /**
-     * SQL statement for updating the local revision of this cluster node. 
+     * SQL statement for updating the local revision of this cluster node.
      */
     protected String updateLocalRevisionStmtSQL;
 
@@ -618,7 +618,7 @@
         insertLocalRevisionStmt = null;
         close(updateLocalRevisionStmt);
         updateLocalRevisionStmt = null;
-        
+
         close(connection);
         connection = null;
     }
@@ -951,7 +951,7 @@
 
     /**
      * Get the database type.
-     * 
+     *
      * @return the database type
      */
     public String getDatabaseType() {
@@ -962,7 +962,7 @@
      * Get the database type.
      * @deprecated
      * This method is deprecated; {@link #getDatabaseType} should be used instead.
-     * 
+     *
      * @return the database type
      */
     public String getSchema() {
@@ -1010,7 +1010,7 @@
 
     /**
      * Set the database type.
-     * 
+     *
      * @param databaseType the database type
      */
     public void setDatabaseType(String databaseType) {
@@ -1020,8 +1020,8 @@
     /**
      * Set the database type.
     * @deprecated
-    * This method is deprecated; {@link #getDatabaseType} should be used instead.
-     * 
+    * This method is deprecated; {@link #setDatabaseType} should be used instead.
+     *
      * @param databaseType the database type
      */
     public void setSchema(String databaseType) {
@@ -1062,7 +1062,7 @@
         janitorNextRun.set(Calendar.SECOND, 0);
         janitorNextRun.set(Calendar.MILLISECOND, 0);
     }
-   
+
     /**
      * This class manages the local revision of the cluster node. It
      * persists the local revision in the LOCAL_REVISIONS table in the
@@ -1076,9 +1076,9 @@
         private long localRevision;
 
         /**
-         * Indicates whether the init method has been called. 
+         * Indicates whether the init method has been called.
          */
-        private boolean initialized = false;
+        private boolean initialized;
 
         /**
          * Checks whether there's a local revision value in the database for this
@@ -1160,7 +1160,7 @@
                 DatabaseJournal.this.close(true);
             }
         }
-        
+
         /**
          * {@inheritDoc}
          */
@@ -1195,7 +1195,7 @@
             }
             log.info("Interrupted: stopping clean-up task.");
         }
-        
+
         /**
          * Cleans old revisions from the clustering table.
          */

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/InstanceRevision.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/InstanceRevision.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/InstanceRevision.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/InstanceRevision.java Thu Jul 16 11:55:39 2009
@@ -17,7 +17,7 @@
 package org.apache.jackrabbit.core.journal;
 
 /**
- * 
+ *
  */
 public interface InstanceRevision {
 
@@ -27,7 +27,7 @@
      * @return instance revision
      * @throws JournalException if some error occurs
      */
-    public long get() throws JournalException;
+    long get() throws JournalException;
 
     /**
      * Set current instance revision.
@@ -35,10 +35,10 @@
      * @param value new instance revision
      * @throws JournalException if some error occurs
      */
-    public void set(long value) throws JournalException;
-    
+    void set(long value) throws JournalException;
+
     /**
      * Closes the instance revision.
      */
-    public void close();
+    void close();
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Journal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Journal.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Journal.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/Journal.java Thu Jul 16 11:55:39 2009
@@ -79,7 +79,7 @@
      * @return the InstanceRevision manager
      * @throws JournalException on error
      */
-    public InstanceRevision getInstanceRevision() throws JournalException;
+    InstanceRevision getInstanceRevision() throws JournalException;
 
     /**
      * Return an iterator over all records after the specified revision.
@@ -88,7 +88,7 @@
      * @return an iterator over all records after the specified revision.
      * @throws JournalException if an error occurs
      */
-    public RecordIterator getRecords(long startRevision)
+    RecordIterator getRecords(long startRevision)
             throws JournalException;
 
     /**
@@ -97,5 +97,5 @@
      * @return an iterator over all records.
      * @throws JournalException if an error occurs
      */
-    public RecordIterator getRecords() throws JournalException;
+    RecordIterator getRecords() throws JournalException;
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MSSqlDatabaseJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MSSqlDatabaseJournal.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MSSqlDatabaseJournal.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/MSSqlDatabaseJournal.java Thu Jul 16 11:55:39 2009
@@ -35,7 +35,7 @@
      */
     public MSSqlDatabaseJournal() {
         setDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver");
-        setSchema("mssql");
+        setDatabaseType("mssql");
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/RotatingLogFile.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/RotatingLogFile.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/RotatingLogFile.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/RotatingLogFile.java Thu Jul 16 11:55:39 2009
@@ -28,7 +28,7 @@
 /**
  * Represents a log file that can be rotated.
  */
-public class RotatingLogFile implements Comparable {
+public class RotatingLogFile implements Comparable<RotatingLogFile> {
 
     /**
      * Logger.
@@ -129,13 +129,6 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    public int compareTo(Object o) {
-        return compareTo((RotatingLogFile) o);
-    }
-
-    /**
      * Compares this log file to another file. It will return
      * a negative number if this log file has a smaller version,
      * a positive number if this log file a bigger version
@@ -161,7 +154,7 @@
             }
         });
 
-        ArrayList l = new ArrayList();
+        ArrayList<RotatingLogFile> l = new ArrayList<RotatingLogFile>();
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
             try {
@@ -174,11 +167,9 @@
         RotatingLogFile[] logFiles = new RotatingLogFile[l.size()];
         l.toArray(logFiles);
 
-        Arrays.sort(logFiles, new Comparator() {
-            public int compare(Object o1, Object o2) {
-                RotatingLogFile lf1 = (RotatingLogFile) o1;
-                RotatingLogFile lf2 = (RotatingLogFile) o2;
-                return lf2.compareTo(lf1);
+        Arrays.sort(logFiles, new Comparator<RotatingLogFile>() {
+            public int compare(RotatingLogFile o1, RotatingLogFile o2) {
+                return o2.compareTo(o1);
             }
         });
         return logFiles;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventFilter.java Thu Jul 16 11:55:39 2009
@@ -27,6 +27,7 @@
 import org.apache.jackrabbit.spi.Path;
 
 import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.NodeType;
 
 /**
  * The <code>EventFilter</code> class implements the filter logic based
@@ -180,10 +181,10 @@
 
         // check node types
         if (nodeTypes != null) {
-            Set eventTypes = eventState.getNodeTypes(session.getNodeTypeManager());
+            Set<NodeType> eventTypes = eventState.getNodeTypes(session.getNodeTypeManager());
             boolean match = false;
             for (int i = 0; i < nodeTypes.length && !match; i++) {
-                for (Iterator iter = eventTypes.iterator(); iter.hasNext();) {
+                for (Iterator<NodeType> iter = eventTypes.iterator(); iter.hasNext();) {
                     NodeTypeImpl nodeType = (NodeTypeImpl) iter.next();
                     match |= nodeType.getQName().equals(nodeTypes[i].getQName())
                             || nodeType.isDerivedFrom(nodeTypes[i].getQName());

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventImpl.java Thu Jul 16 11:55:39 2009
@@ -18,7 +18,6 @@
 
 import java.util.Map;
 import java.util.HashMap;
-import java.util.Iterator;
 
 import org.apache.jackrabbit.api.observation.JackrabbitEvent;
 import javax.jcr.observation.Event;
@@ -141,11 +140,10 @@
     /**
      * {@inheritDoc}
      */
-    public Map getInfo() throws RepositoryException {
-        Map info = new HashMap();
-        for (Iterator it = eventState.getInfo().entrySet().iterator(); it.hasNext(); ) {
-            Map.Entry entry = (Map.Entry) it.next();
-            InternalValue value = (InternalValue) entry.getValue();
+    public Map<String, String> getInfo() throws RepositoryException {
+        Map<String, String> info = new HashMap<String, String>();
+        for (Map.Entry<String, InternalValue> entry : eventState.getInfo().entrySet()) {
+            InternalValue value = entry.getValue();
             String strValue = null;
             if (value != null) {
                 strValue = ValueFormat.getJCRString(value, session);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventJournalImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventJournalImpl.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventJournalImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventJournalImpl.java Thu Jul 16 11:55:39 2009
@@ -67,7 +67,7 @@
      * Each sorted map has the following structure:
      * Key=Long (timestamp), Value=Long (revision)
      */
-    private static final Map REVISION_SKIP_MAPS = new WeakHashMap();
+    private static final Map<Journal, SortedMap<Long, Long>> REVISION_SKIP_MAPS = new WeakHashMap<Journal, SortedMap<Long, Long>>();
 
     /**
      * Last revision seen by this event journal.
@@ -97,7 +97,7 @@
     /**
      * Buffer of {@link EventBundle}s.
      */
-    private final List eventBundleBuffer = new LinkedList();
+    private final List<EventBundle> eventBundleBuffer = new LinkedList<EventBundle>();
 
     /**
      * The current position of this iterator.
@@ -129,12 +129,12 @@
         long time = System.currentTimeMillis();
 
         // get skip map for this journal
-        SortedMap skipMap = getSkipMap();
+        SortedMap<Long, Long> skipMap = getSkipMap();
         synchronized (skipMap) {
-            SortedMap head = skipMap.headMap(new Long(time));
+            SortedMap<Long, Long> head = skipMap.headMap(new Long(time));
             if (!head.isEmpty()) {
                 eventBundleBuffer.clear();
-                lastRevision = (Long) head.get(head.lastKey());
+                lastRevision = head.get(head.lastKey());
             }
         }
 
@@ -267,7 +267,7 @@
          * {@inheritDoc}
          */
         public void process(ChangeLogRecord record) {
-            List events = record.getEvents();
+            List<EventState> events = record.getEvents();
             if (!events.isEmpty()) {
                 EventBundle bundle = new EventBundle(events,
                         record.getTimestamp(), record.getUserData(), filter);
@@ -304,7 +304,7 @@
      */
     private EventBundle getCurrentBundle() {
         while (!eventBundleBuffer.isEmpty()) {
-            EventBundle bundle = (EventBundle) eventBundleBuffer.get(0);
+            EventBundle bundle = eventBundleBuffer.get(0);
             if (bundle.events.hasNext()) {
                 return bundle;
             } else {
@@ -346,7 +346,7 @@
 
                 if (processor.getNumEvents() >= MIN_BUFFER_SIZE) {
                     // remember in skip map
-                    SortedMap skipMap = getSkipMap();
+                    SortedMap<Long, Long> skipMap = getSkipMap();
                     Long timestamp = new Long(processor.getLastTimestamp());
                     synchronized (skipMap) {
                         if (log.isDebugEnabled()) {
@@ -369,11 +369,11 @@
     /**
      * @return the revision skip map for this journal.
      */
-    private SortedMap getSkipMap() {
+    private SortedMap<Long, Long> getSkipMap() {
         synchronized (REVISION_SKIP_MAPS) {
-            SortedMap map = (SortedMap) REVISION_SKIP_MAPS.get(journal);
+            SortedMap<Long, Long> map = REVISION_SKIP_MAPS.get(journal);
             if (map == null) {
-                map = new TreeMap();
+                map = new TreeMap<Long, Long>();
                 REVISION_SKIP_MAPS.put(journal, map);
             }
             return map;
@@ -403,7 +403,7 @@
          * @param userData the user data associated with this event.
          * @param filter the event filter.
          */
-        private EventBundle(List eventStates,
+        private EventBundle(List<EventState> eventStates,
                             long timestamp,
                             String userData,
                             EventFilter filter) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventListenerIteratorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventListenerIteratorImpl.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventListenerIteratorImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventListenerIteratorImpl.java Thu Jul 16 11:55:39 2009
@@ -48,7 +48,7 @@
     /**
      * Current position
      */
-    private long pos = 0;
+    private long pos;
 
     /**
      * Creates a new <code>EventListenerIteratorImpl</code>.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java?rev=794641&r1=794640&r2=794641&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java Thu Jul 16 11:55:39 2009
@@ -33,6 +33,8 @@
 import javax.jcr.Session;
 import javax.jcr.RepositoryException;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
+import javax.jcr.nodetype.NodeType;
+
 import java.util.Set;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -107,7 +109,7 @@
     /**
      * Set of mixin QNames assigned to the parent node.
      */
-    private final Set mixins;
+    private final Set<Name> mixins;
 
     /**
      * Set of node types. This Set consists of the primary node type and all
@@ -116,7 +118,7 @@
      * This <code>Set</code> is initialized when
      * {@link #getNodeTypes(NodeTypeManagerImpl)} is called for the first time.
      */
-    private Set allTypes;
+    private Set<NodeType> allTypes;
 
     /**
      * The session that caused this event.
@@ -142,13 +144,13 @@
     /**
      * The info Map associated with this event.
      */
-    private Map info = Collections.EMPTY_MAP;
+    private Map<String, InternalValue> info = Collections.emptyMap();
 
     /**
      * If set to <code>true</code>, indicates that the child node of a node
      * added or removed event is a shareable node.
      */
-    private boolean shareableNode = false;
+    private boolean shareableNode;
 
     /**
      * Creates a new <code>EventState</code> instance.
@@ -169,7 +171,7 @@
      */
     private EventState(int type, NodeId parentId, Path parentPath,
                        NodeId childId, Path.Element childPath, Name nodeType,
-                       Set mixins, Session session, boolean external) {
+                       Set<Name> mixins, Session session, boolean external) {
 
         int mask = (Event.PROPERTY_ADDED | Event.PROPERTY_CHANGED | Event.PROPERTY_REMOVED);
         if ((type & mask) > 0) {
@@ -214,7 +216,7 @@
                                             NodeId childId,
                                             Path.Element childPath,
                                             Name nodeType,
-                                            Set mixins,
+                                            Set<Name> mixins,
                                             Session session) {
 
         return childNodeAdded(parentId, parentPath, childId,
@@ -242,7 +244,7 @@
                                             NodeId childId,
                                             Path.Element childPath,
                                             Name nodeType,
-                                            Set mixins,
+                                            Set<Name> mixins,
                                             Session session,
                                             boolean external) {
 
@@ -270,7 +272,7 @@
                                               NodeId childId,
                                               Path.Element childPath,
                                               Name nodeType,
-                                              Set mixins,
+                                              Set<Name> mixins,
                                               Session session) {
 
         return childNodeRemoved(parentId, parentPath, childId,
@@ -298,7 +300,7 @@
                                               NodeId childId,
                                               Path.Element childPath,
                                               Name nodeType,
-                                              Set mixins,
+                                              Set<Name> mixins,
                                               Session session,
                                               boolean external) {
 
@@ -330,7 +332,7 @@
                                        NodeId childId,
                                        Path.Element childPath,
                                        Name nodeType,
-                                       Set mixins,
+                                       Set<Name> mixins,
                                        Session session,
                                        boolean external) {
 
@@ -361,7 +363,7 @@
                                        NodeId childId,
                                        Path srcPath,
                                        Name nodeType,
-                                       Set mixins,
+                                       Set<Name> mixins,
                                        Session session,
                                        boolean external)
             throws ItemStateException {
@@ -369,7 +371,7 @@
             EventState es = nodeMoved(parentId, destPath.getAncestor(1),
                     childId, destPath.getNameElement(), nodeType, mixins,
                     session, external);
-            Map info = new HashMap();
+            Map<String, InternalValue> info = new HashMap<String, InternalValue>();
             info.put(SRC_ABS_PATH, InternalValue.create(srcPath));
             info.put(DEST_ABS_PATH, InternalValue.create(destPath));
             es.setInfo(info);
@@ -412,12 +414,12 @@
                                            Path.Element srcChildPath,
                                            Path.Element beforeChildPath,
                                            Name nodeType,
-                                           Set mixins,
+                                           Set<Name> mixins,
                                            Session session,
                                            boolean external) {
         EventState es = nodeMoved(parentId, parentPath, childId, destChildPath,
                nodeType, mixins, session, external);
-        Map info = new HashMap();
+        Map<String, InternalValue> info = new HashMap<String, InternalValue>();
         info.put(SRC_CHILD_REL_PATH, createValue(srcChildPath));
         InternalValue value = null;
         if (beforeChildPath != null) {
@@ -446,7 +448,7 @@
                                            Path parentPath,
                                            Path.Element childPath,
                                            Name nodeType,
-                                           Set mixins,
+                                           Set<Name> mixins,
                                            Session session) {
 
         return propertyAdded(parentId, parentPath, childPath,
@@ -472,7 +474,7 @@
                                            Path parentPath,
                                            Path.Element childPath,
                                            Name nodeType,
-                                           Set mixins,
+                                           Set<Name> mixins,
                                            Session session,
                                            boolean external) {
 
@@ -498,7 +500,7 @@
                                              Path parentPath,
                                              Path.Element childPath,
                                              Name nodeType,
-                                             Set mixins,
+                                             Set<Name> mixins,
                                              Session session) {
 
         return propertyRemoved(parentId, parentPath, childPath,
@@ -524,7 +526,7 @@
                                              Path parentPath,
                                              Path.Element childPath,
                                              Name nodeType,
-                                             Set mixins,
+                                             Set<Name> mixins,
                                              Session session,
                                              boolean external) {
 
@@ -550,7 +552,7 @@
                                              Path parentPath,
                                              Path.Element childPath,
                                              Name nodeType,
-                                             Set mixins,
+                                             Set<Name> mixins,
                                              Session session) {
 
         return propertyChanged(parentId, parentPath, childPath,
@@ -576,7 +578,7 @@
                                              Path parentPath,
                                              Path.Element childPath,
                                              Name nodeType,
-                                             Set mixins,
+                                             Set<Name> mixins,
                                              Session session,
                                              boolean external) {
 
@@ -645,7 +647,7 @@
      *
      * @return the mixin names as <code>Name</code>s.
      */
-    public Set getMixinNames() {
+    public Set<Name> getMixinNames() {
         return mixins;
     }
 
@@ -657,17 +659,17 @@
      *
      * @return <code>Set</code> of {@link javax.jcr.nodetype.NodeType}s.
      */
-    public Set getNodeTypes(NodeTypeManagerImpl ntMgr) {
+    public Set<NodeType> getNodeTypes(NodeTypeManagerImpl ntMgr) {
         if (allTypes == null) {
-            Set tmp = new HashSet();
+            Set<NodeType> tmp = new HashSet<NodeType>();
             try {
                 tmp.add(ntMgr.getNodeType(nodeType));
             } catch (NoSuchNodeTypeException e) {
                 log.warn("Unknown node type: " + nodeType);
             }
-            Iterator it = mixins.iterator();
+            Iterator<Name> it = mixins.iterator();
             while (it.hasNext()) {
-                Name mixinName = (Name) it.next();
+                Name mixinName = it.next();
                 try {
                     tmp.add(ntMgr.getNodeType(mixinName));
                 } catch (NoSuchNodeTypeException e) {
@@ -725,7 +727,7 @@
     /**
      * @return an unmodifiable info Map.
      */
-    public Map getInfo() {
+    public Map<String, InternalValue> getInfo() {
         return info;
     }
 
@@ -734,8 +736,8 @@
      *
      * @param info the new info map.
      */
-    public void setInfo(Map info) {
-        this.info = Collections.unmodifiableMap(new HashMap(info));
+    public void setInfo(Map<String, InternalValue> info) {
+        this.info = Collections.unmodifiableMap(new HashMap<String, InternalValue>(info));
     }
 
     /**



Mime
View raw message