jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1360658 - in /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr: ItemImpl.java NodeImpl.java PropertyImpl.java
Date Thu, 12 Jul 2012 12:35:53 GMT
Author: mduerig
Date: Thu Jul 12 12:35:53 2012
New Revision: 1360658

URL: http://svn.apache.org/viewvc?rev=1360658&view=rev
Log:
OAK-183: Remove duplicate fields from NodeImpl and PropertyImpl which are already in the ItemImpl
super class

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ItemImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ItemImpl.java?rev=1360658&r1=1360657&r2=1360658&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ItemImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ItemImpl.java
Thu Jul 12 12:35:53 2012
@@ -16,10 +16,6 @@
  */
 package org.apache.jackrabbit.oak.jcr;
 
-import org.apache.jackrabbit.commons.AbstractItem;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import javax.annotation.Nonnull;
 import javax.jcr.InvalidItemStateException;
 import javax.jcr.Item;
@@ -28,20 +24,24 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.ValueFactory;
 
+import org.apache.jackrabbit.commons.AbstractItem;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * {@code ItemImpl}...
  */
-abstract class ItemImpl extends AbstractItem {
+abstract class ItemImpl<T extends ItemDelegate> extends AbstractItem {
 
     protected final SessionDelegate sessionDelegate;
-    protected final ItemDelegate dlg;
+    protected final T dlg;
 
     /**
      * logger instance
      */
     private static final Logger log = LoggerFactory.getLogger(ItemImpl.class);
 
-    protected ItemImpl(SessionDelegate sessionDelegate, ItemDelegate itemDelegate) {
+    protected ItemImpl(SessionDelegate sessionDelegate, T itemDelegate) {
         this.sessionDelegate = sessionDelegate;
         this.dlg = itemDelegate;
     }

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java?rev=1360658&r1=1360657&r2=1360658&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Thu Jul 12 12:35:53 2012
@@ -81,18 +81,15 @@ import static org.apache.jackrabbit.oak.
 /**
  * {@code NodeImpl}...
  */
-public class NodeImpl extends ItemImpl implements Node {
+public class NodeImpl extends ItemImpl<NodeDelegate> implements Node {
 
     /**
      * logger instance
      */
     private static final Logger log = LoggerFactory.getLogger(NodeImpl.class);
 
-    private final NodeDelegate dlg;
-
     public NodeImpl(NodeDelegate dlg) {
         super(dlg.getSessionDelegate(), dlg);
-        this.dlg = dlg;
     }
 
     //---------------------------------------------------------------< Item >---
@@ -1030,9 +1027,9 @@ public class NodeImpl extends ItemImpl i
 
     /**
      * Checks whether this node is locked by looking for the
-     * <code>jcr:lockOwner</code> property either on this node or
-     * on any ancestor that also has the <code>jcr:lockIsDeep</code>
-     * property set to <code>true</code>.
+     * {@code jcr:lockOwner} property either on this node or
+     * on any ancestor that also has the {@code jcr:lockIsDeep}
+     * property set to {@code true}.
      */
     @Override
     public boolean isLocked() throws RepositoryException {
@@ -1060,7 +1057,7 @@ public class NodeImpl extends ItemImpl i
 
     /**
      * Checks whether this node holds a lock by looking for the
-     * <code>jcr:lockOwner</code> property.
+     * {@code jcr:lockOwner} property.
      */
     @Override
     public boolean holdsLock() throws RepositoryException {

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java?rev=1360658&r1=1360657&r2=1360658&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
Thu Jul 12 12:35:53 2012
@@ -16,11 +16,11 @@
  */
 package org.apache.jackrabbit.oak.jcr;
 
-import org.apache.jackrabbit.oak.api.Tree.Status;
-import org.apache.jackrabbit.oak.jcr.value.ValueConverter;
-import org.apache.jackrabbit.value.ValueHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.jcr.Binary;
@@ -35,27 +35,25 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 import javax.jcr.ValueFormatException;
 import javax.jcr.nodetype.PropertyDefinition;
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.List;
+
+import org.apache.jackrabbit.oak.api.Tree.Status;
+import org.apache.jackrabbit.oak.jcr.value.ValueConverter;
+import org.apache.jackrabbit.value.ValueHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * {@code PropertyImpl}...
  */
-public class PropertyImpl extends ItemImpl implements Property {
+public class PropertyImpl extends ItemImpl<PropertyDelegate> implements Property {
 
     /**
      * logger instance
      */
     private static final Logger log = LoggerFactory.getLogger(PropertyImpl.class);
 
-    private final PropertyDelegate dlg;
-    
     PropertyImpl(PropertyDelegate dlg) {
         super(dlg.getSessionDelegate(), dlg);
-        this.dlg = dlg;
     }
 
     //---------------------------------------------------------------< Item >---



Mime
View raw message