jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1095390 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster: ChangeLogRecord.java ClusterNode.java ClusterSession.java LockRecord.java PrivilegeRecord.java WorkspaceRecord.java
Date Wed, 20 Apr 2011 12:29:24 GMT
Author: angela
Date: Wed Apr 20 12:29:24 2011
New Revision: 1095390

URL: http://svn.apache.org/viewvc?rev=1095390&view=rev
Log:
minor improvement

Modified:
    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/ClusterSession.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockRecord.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/WorkspaceRecord.java

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=1095390&r1=1095389&r2=1095390&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
Wed Apr 20 12:29:24 2011
@@ -155,6 +155,7 @@ public class ChangeLogRecord extends Clu
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void doRead() throws JournalException {
         int identifier = this.identifier;
 
@@ -186,6 +187,7 @@ public class ChangeLogRecord extends Clu
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void readEndMarker() throws JournalException {
         // This record type uses the end marker itself to indicate that
         // no more node/property/event records are available, so
@@ -367,6 +369,7 @@ public class ChangeLogRecord extends Clu
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void doWrite() throws JournalException {
         writeTimestampRecord();
         writeUserDataRecord();
@@ -466,9 +469,8 @@ public class ChangeLogRecord extends Clu
 
         Set<Name> mixins = event.getMixinNames();
         record.writeInt(mixins.size());
-        Iterator<Name> iter = mixins.iterator();
-        while (iter.hasNext()) {
-            record.writeQName(iter.next());
+        for (Name mixin : mixins) {
+            record.writeQName(mixin);
         }
         record.writeString(event.getUserId());
 
@@ -494,6 +496,7 @@ public class ChangeLogRecord extends Clu
     /**
      * {@inheritDoc}
      */
+    @Override
     public void process(ClusterRecordProcessor processor) {
         processor.process(this);
     }

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=1095390&r1=1095389&r2=1095390&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
Wed Apr 20 12:29:24 2011
@@ -648,7 +648,7 @@ public class ClusterNode implements Runn
             try {
                 record.update();
                 setRevision(record.getRevision());
-                log.debug("revision {} {}", new Long(record.getRevision()), path);
+                log.debug("revision {} {}", record.getRevision(), path);
             } catch (JournalException e) {
                 String msg = "Unable to commit log entry.";
                 log.error(msg, e);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterSession.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterSession.java?rev=1095390&r1=1095389&r2=1095390&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterSession.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterSession.java
Wed Apr 20 12:29:24 2011
@@ -18,7 +18,6 @@ package org.apache.jackrabbit.core.clust
 
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.util.Map;
 
 import javax.jcr.Credentials;
 import javax.jcr.Item;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockRecord.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockRecord.java?rev=1095390&r1=1095389&r2=1095390&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockRecord.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockRecord.java
Wed Apr 20 12:29:24 2011
@@ -99,6 +99,7 @@ public class LockRecord extends ClusterR
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void doRead() throws JournalException {
         nodeId = record.readNodeId();
         isLock = record.readBoolean();
@@ -111,6 +112,7 @@ public class LockRecord extends ClusterR
     /**
      * {@inheritDoc}
      */
+    @Override
     protected void doWrite() throws JournalException {
         record.writeChar(IDENTIFIER);
         record.writeNodeId(nodeId);
@@ -124,6 +126,7 @@ public class LockRecord extends ClusterR
     /**
      * {@inheritDoc}
      */
+    @Override
     public void process(ClusterRecordProcessor processor) {
         processor.process(this);
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java?rev=1095390&r1=1095389&r2=1095390&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/PrivilegeRecord.java
Wed Apr 20 12:29:24 2011
@@ -19,8 +19,6 @@ package org.apache.jackrabbit.core.clust
 import org.apache.jackrabbit.core.journal.JournalException;
 import org.apache.jackrabbit.core.journal.Record;
 import org.apache.jackrabbit.spi.commons.privilege.PrivilegeDefinition;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -32,11 +30,6 @@ import java.util.HashSet;
 public class PrivilegeRecord extends ClusterRecord {
 
     /**
-     * logger instance
-     */
-    private static final Logger log = LoggerFactory.getLogger(PrivilegeRecord.class);
-
-    /**
      * Identifier: PRIVILEGES.
      */
     static final char IDENTIFIER = 'A';
@@ -59,7 +52,7 @@ public class PrivilegeRecord extends Clu
     @Override
     protected void doRead() throws JournalException {
         int size = record.readInt();
-        definitions = new HashSet();
+        definitions = new HashSet<PrivilegeDefinition>();
         for (int i = 0; i < size; i++) {
             definitions.add(record.readPrivilegeDef());
         }

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=1095390&r1=1095389&r2=1095390&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
Wed Apr 20 12:29:24 2011
@@ -60,6 +60,7 @@ public class WorkspaceRecord extends Clu
         private char[] charArray;
         private byte[] byteArray;
 
+        @Override
         int getType() {
             return CREATE_WORKSPACE_ACTION_TYPE;
         }
@@ -74,6 +75,7 @@ public class WorkspaceRecord extends Clu
             this.byteArray = inputSource.getByteArray();
         }
 
+        @Override
         void write(Record record) throws JournalException {
             // store the input source
             record.writeString(inputSource.getEncoding());
@@ -98,6 +100,7 @@ public class WorkspaceRecord extends Clu
             }
         }
 
+        @Override
         void read(Record record) throws JournalException {
             // restore the input source
             inputSource = new InputSource();
@@ -151,6 +154,7 @@ public class WorkspaceRecord extends Clu
         super(record);
     }
 
+    @Override
     protected void doRead() throws JournalException {
 
         workspace = record.readString();
@@ -169,6 +173,7 @@ public class WorkspaceRecord extends Clu
         }
     }
 
+    @Override
     protected void doWrite() throws JournalException {
 
         record.writeChar(IDENTIFIER);
@@ -193,6 +198,7 @@ public class WorkspaceRecord extends Clu
         return (CreateWorkspaceAction) action;
     }
 
+    @Override
     public void process(ClusterRecordProcessor processor) {
         processor.process(this);
     }



Mime
View raw message