jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r169179 - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version: GenericVersionSelector.java persistence/InternalVersionHistoryImpl.java persistence/NativePVM.java
Date Sun, 08 May 2005 22:08:26 GMT
Author: jukka
Date: Sun May  8 15:08:26 2005
New Revision: 169179

URL: http://svn.apache.org/viewcvs?rev=169179&view=rev
Log:
JCR-97: Reverting a few inline conditional removals.

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/GenericVersionSelector.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/NativePVM.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/GenericVersionSelector.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/GenericVersionSelector.java?rev=169179&r1=169178&r2=169179&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/GenericVersionSelector.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/GenericVersionSelector.java
Sun May  8 15:08:26 2005
@@ -216,10 +216,7 @@
      */
     public static Version selectByDate(VersionHistory history, Calendar date)
             throws RepositoryException {
-        long time = Long.MAX_VALUE;
-        if (date != null) {
-            time = date.getTimeInMillis();
-        }
+        long time = (date != null) ? date.getTimeInMillis() : Long.MAX_VALUE;
         long latestDate = Long.MIN_VALUE;
         Version latestVersion = null;
         VersionIterator iter = history.getAllVersions();

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java?rev=169179&r1=169178&r2=169179&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java
Sun May  8 15:08:26 2005
@@ -297,10 +297,8 @@
     public InternalVersion setVersionLabel(QName versionName, QName label, boolean move)
             throws VersionException {
 
-        InternalVersion version = null;
-        if (versionName != null) {
-            version = getVersion(versionName);
-        }
+        InternalVersion version =
+            (versionName != null) ? version = getVersion(versionName) : null;
         if (versionName != null && version == null) {
             throw new VersionException("Version " + versionName + " does not exist in this
version history.");
         }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/NativePVM.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/NativePVM.java?rev=169179&r1=169178&r2=169179&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/NativePVM.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/NativePVM.java
Sun May  8 15:08:26 2005
@@ -384,10 +384,9 @@
             try {
                 NodeState state = (NodeState) stateMgr.getItemState(id);
                 PersistentNode pNode = new PersistentNode(stateMgr, state);
-                InternalVersionItem parent = null;
-                if (pNode.getParentUUID() != null) {
-                    parent = getItem(pNode.getParentUUID());
-                }
+                String parentUUID = pNode.getParentUUID();
+                InternalVersionItem parent =
+                    (parentUUID != null) ? getItem(parentUUID) : null;
                 QName ntName = state.getNodeTypeName();
                 if (ntName.equals(NT_REP_FROZEN)) {
                     item = new InternalFrozenNodeImpl(this, pNode, parent);



Mime
View raw message