jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1097446 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: ./ lock/ nodetype/ value/ xml/
Date Thu, 28 Apr 2011 13:20:03 GMT
Author: angela
Date: Thu Apr 28 13:20:02 2011
New Revision: 1097446

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

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/XALockImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/ValueFactoryImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/DocViewImportHandler.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewImportHandler.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/TargetImportHandler.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
Thu Apr 28 13:20:02 2011
@@ -219,7 +219,7 @@ public class XASessionImpl extends Sessi
             log.error("Resource already associated with a transaction.");
             throw new XAException(XAException.XAER_PROTO);
         }
-        TransactionContext tx = (TransactionContext) txGlobal.get(xid);
+        TransactionContext tx = txGlobal.get(xid);
         if (flags == TMNOFLAGS) {
             if (tx != null) {
                 throw new XAException(XAException.XAER_DUPID);
@@ -275,7 +275,7 @@ public class XASessionImpl extends Sessi
      * without having been resumed again.
      */
     public void end(Xid xid, int flags) throws XAException {
-        TransactionContext tx = (TransactionContext) txGlobal.get(xid);
+        TransactionContext tx = txGlobal.get(xid);
         if (tx == null) {
             throw new XAException(XAException.XAER_NOTA);
         }
@@ -305,7 +305,7 @@ public class XASessionImpl extends Sessi
      * {@inheritDoc}
      */
     public int prepare(Xid xid) throws XAException {
-        TransactionContext tx = (TransactionContext) txGlobal.get(xid);
+        TransactionContext tx = txGlobal.get(xid);
         if (tx == null) {
             throw new XAException(XAException.XAER_NOTA);
         }
@@ -317,7 +317,7 @@ public class XASessionImpl extends Sessi
      * {@inheritDoc}
      */
     public void commit(Xid xid, boolean onePhase) throws XAException {
-        TransactionContext tx = (TransactionContext) txGlobal.get(xid);
+        TransactionContext tx = txGlobal.get(xid);
         if (tx == null) {
             throw new XAException(XAException.XAER_NOTA);
         }
@@ -333,7 +333,7 @@ public class XASessionImpl extends Sessi
      * {@inheritDoc}
      */
     public void rollback(Xid xid) throws XAException {
-        TransactionContext tx = (TransactionContext) txGlobal.get(xid);
+        TransactionContext tx = txGlobal.get(xid);
         if (tx == null) {
             throw new XAException(XAException.XAER_NOTA);
         }
@@ -385,6 +385,7 @@ public class XASessionImpl extends Sessi
     /**
      * {@inheritDoc}
      */
+    @Override
     public synchronized void logout() {
         super.logout();
         // dispose the caches

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
Thu Apr 28 13:20:02 2011
@@ -118,6 +118,7 @@ public class LockManagerImpl
         /**
          * {@inheritDoc}
          */
+        @Override
         public void acquire() throws InterruptedException {
         	if (Thread.interrupted()) throw new InterruptedException();
         	Xid currentXid = TransactionContext.getCurrentXid();
@@ -141,6 +142,7 @@ public class LockManagerImpl
         /**
          * {@inheritDoc}
          */
+        @Override
         public synchronized void release()  {
         	Xid currentXid = TransactionContext.getCurrentXid();
             if (activeXid != null && !isSameGlobalTx(currentXid))

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/XALockImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/XALockImpl.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/XALockImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/XALockImpl.java
Thu Apr 28 13:20:02 2011
@@ -53,6 +53,7 @@ class XALockImpl extends LockImpl {
      * <p/>
      * Refresh lock information if XA environment has changed.
      */
+    @Override
     public boolean isLive() throws RepositoryException {
         if (info.mayChange()) {
             if (lockMgr.differentXAEnv(info)) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeImpl.java
Thu Apr 28 13:20:02 2011
@@ -90,6 +90,7 @@ public class NodeTypeImpl extends Abstra
     /**
      * {@inheritDoc}
      */
+    @Override
     public boolean isNodeType(Name nodeTypeName) {
         return ent.includesNodeType(nodeTypeName);
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
Thu Apr 28 13:20:02 2011
@@ -103,9 +103,7 @@ public class NodeTypeManagerImpl extends
     /**
      * Creates a new <code>NodeTypeManagerImpl</code> instance.
      *
-     * @param ntReg      node type registry
-     * @param session    current session
-     * @param store      the data store
+     * @param context the session context
      */
     @SuppressWarnings("unchecked")
     public NodeTypeManagerImpl(SessionContext context) {
@@ -137,6 +135,7 @@ public class NodeTypeManagerImpl extends
      * @param def the QNodeDefinition
      * @return the node definition
      */
+    @Override
     public NodeDefinitionImpl getNodeDefinition(QNodeDefinition def) {
         synchronized (ndCache) {
             NodeDefinitionImpl ndi = ndCache.get(def);
@@ -152,6 +151,7 @@ public class NodeTypeManagerImpl extends
      * @param def prop def
      * @return the property definition
      */
+    @Override
     public PropertyDefinitionImpl getPropertyDefinition(QPropertyDefinition def) {
         synchronized (pdCache) {
             PropertyDefinitionImpl pdi = pdCache.get(def);
@@ -169,6 +169,7 @@ public class NodeTypeManagerImpl extends
      * @return node type
      * @throws NoSuchNodeTypeException if the nodetype does not exit
      */
+    @Override
     public NodeTypeImpl getNodeType(Name name) throws NoSuchNodeTypeException {
         synchronized (ntCache) {
             NodeTypeImpl nt = ntCache.get(name);
@@ -188,6 +189,7 @@ public class NodeTypeManagerImpl extends
     /**
      * @see org.apache.jackrabbit.spi.commons.nodetype.AbstractNodeTypeManager#getNamePathResolver()
      */
+    @Override
     public NamePathResolver getNamePathResolver() {
         return context;
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
Thu Apr 28 13:20:02 2011
@@ -658,6 +658,7 @@ public class InternalValue extends Abstr
     /**
      * @see org.apache.jackrabbit.spi.QValue#getLength()
      */
+    @Override
     public long getLength() throws RepositoryException {
         if (PropertyType.BINARY == type) {
             return ((Binary) val).getSize();
@@ -685,6 +686,7 @@ public class InternalValue extends Abstr
     /**
      * @see org.apache.jackrabbit.spi.QValue#getBinary()
      */
+    @Override
     public Binary getBinary() throws RepositoryException {
         if (type == PropertyType.BINARY) {
             // return an independent copy that can be disposed without
@@ -704,6 +706,7 @@ public class InternalValue extends Abstr
     /**
      * @see org.apache.jackrabbit.spi.QValue#discard()
      */
+    @Override
     public void discard() {
         if (type == PropertyType.BINARY) {
             BLOBFileValue bfv = (BLOBFileValue) val;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValueFactory.java
Thu Apr 28 13:20:02 2011
@@ -51,34 +51,42 @@ public final class InternalValueFactory 
         return INSTANCE;
     }
 
+    @Override
     public QValue create(Calendar value) throws RepositoryException {
         return InternalValue.create(value);
     }
 
+    @Override
     public QValue create(double value) throws RepositoryException {
         return InternalValue.create(value);
     }
 
+    @Override
     public QValue create(long value) throws RepositoryException {
         return InternalValue.create(value);
     }
 
+    @Override
     public QValue create(boolean value) throws RepositoryException {
         return InternalValue.create(value);
     }
 
+    @Override
     public QValue create(Name value) throws RepositoryException {
         return InternalValue.create(value);
     }
 
+    @Override
     public QValue create(Path value) throws RepositoryException {
         return InternalValue.create(value);
     }
 
+    @Override
     public QValue create(URI value) throws RepositoryException {
         return InternalValue.create(value);
     }
 
+    @Override
     public QValue create(BigDecimal value) throws RepositoryException {
         return InternalValue.create(value);
     }
@@ -100,10 +108,12 @@ public final class InternalValueFactory 
         return InternalValue.createTemporary(in);
     }
 
+    @Override
     protected QValue createReference(String ref, boolean weak) {
         return InternalValue.create(new NodeId(ref), weak);
     }
 
+    @Override
     protected QValue createString(String value) {
         return InternalValue.create(value);
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/ValueFactoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/ValueFactoryImpl.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/ValueFactoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/ValueFactoryImpl.java
Thu Apr 28 13:20:02 2011
@@ -58,6 +58,7 @@ public class ValueFactoryImpl extends Va
         this.store = store;
     }
 
+    @Override
     public Value createValue(QValue qvalue) {
         if (qvalue instanceof InternalValue && PropertyType.BINARY == qvalue.getType())
{
             try {
@@ -70,6 +71,7 @@ public class ValueFactoryImpl extends Va
         return super.createValue(qvalue);
     }
 
+    @Override
     public Binary createBinary(InputStream stream) throws RepositoryException {
         try {
             QValue value = getQValueFactory().create(stream);
@@ -86,6 +88,7 @@ public class ValueFactoryImpl extends Va
         }
     }
 
+    @Override
     public Value createValue(Binary binary) {
         try {
             if (binary instanceof BLOBInDataStore) {
@@ -112,6 +115,7 @@ public class ValueFactoryImpl extends Va
         return super.createValue(binary);
     }
 
+    @Override
     public Value createValue(InputStream value) {
         try {
             InternalValue qvalue = (InternalValue) getQValueFactory().create(value);
@@ -126,6 +130,7 @@ public class ValueFactoryImpl extends Va
         }
     }
 
+    @Override
     public Value createValue(String value, int type) throws ValueFormatException {
         if (PropertyType.BINARY == type) {
             try {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/DocViewImportHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/DocViewImportHandler.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/DocViewImportHandler.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/DocViewImportHandler.java
Thu Apr 28 13:20:02 2011
@@ -218,6 +218,7 @@ class DocViewImportHandler extends Targe
      * See also {@link org.apache.jackrabbit.commons.xml.Exporter#exportProperties(Node)}
      * regarding special handling of multi-valued properties on export.
      */
+    @Override
     public void startElement(String namespaceURI, String localName,
                              String qName, Attributes atts)
             throws SAXException {
@@ -295,6 +296,7 @@ class DocViewImportHandler extends Targe
     /**
      * {@inheritDoc}
      */
+    @Override
     public void characters(char[] ch, int start, int length)
             throws SAXException {
         /**
@@ -307,6 +309,7 @@ class DocViewImportHandler extends Targe
     /**
      * {@inheritDoc}
      */
+    @Override
     public void ignorableWhitespace(char[] ch, int start, int length)
             throws SAXException {
         /**
@@ -319,6 +322,7 @@ class DocViewImportHandler extends Targe
     /**
      * {@inheritDoc}
      */
+    @Override
     public void endElement(String namespaceURI, String localName, String qName)
             throws SAXException {
         // process buffered character data

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewImportHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewImportHandler.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewImportHandler.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewImportHandler.java
Thu Apr 28 13:20:02 2011
@@ -111,6 +111,7 @@ class SysViewImportHandler extends Targe
     /**
      * {@inheritDoc}
      */
+    @Override
     public void startElement(String namespaceURI, String localName,
                              String qName, Attributes atts)
             throws SAXException {
@@ -198,6 +199,7 @@ class SysViewImportHandler extends Targe
     /**
      * {@inheritDoc}
      */
+    @Override
     public void characters(char[] ch, int start, int length)
             throws SAXException {
         if (currentPropValue != null) {
@@ -214,6 +216,7 @@ class SysViewImportHandler extends Targe
     /**
      * {@inheritDoc}
      */
+    @Override
     public void ignorableWhitespace(char[] ch, int start, int length)
             throws SAXException {
         if (currentPropValue != null) {
@@ -233,6 +236,7 @@ class SysViewImportHandler extends Targe
     /**
      * {@inheritDoc}
      */
+    @Override
     public void endElement(String namespaceURI, String localName, String qName)
             throws SAXException {
         Name name = NameFactoryImpl.getInstance().create(namespaceURI, localName);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/TargetImportHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/TargetImportHandler.java?rev=1097446&r1=1097445&r2=1097446&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/TargetImportHandler.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/TargetImportHandler.java
Thu Apr 28 13:20:02 2011
@@ -60,6 +60,7 @@ abstract class TargetImportHandler exten
      * @throws SAXException if the importer can not be initialized
      * @see DefaultHandler#startDocument()
      */
+    @Override
     public void startDocument() throws SAXException {
         try {
             importer.start();
@@ -76,6 +77,7 @@ abstract class TargetImportHandler exten
      * @throws SAXException if the importer can not be closed
      * @see DefaultHandler#endDocument()
      */
+    @Override
     public void endDocument() throws SAXException {
         try {
             importer.end();
@@ -93,7 +95,7 @@ abstract class TargetImportHandler exten
      *
      * @param mappings local namespace mappings
      */
-    public final void startNamespaceContext(Map mappings) {
+    public final void startNamespaceContext(Map<String, String> mappings) {
         nsContext = new NamespaceContext(nsContext, mappings);
         resolver = new DefaultNamePathResolver(nsContext);
     }



Mime
View raw message