You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2012/01/02 19:53:27 UTC

svn commit: r1226515 - in /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version: ./ simple/

Author: reschke
Date: Mon Jan  2 18:53:27 2012
New Revision: 1226515

URL: http://svn.apache.org/viewvc?rev=1226515&view=rev
Log:
JCR-3177: Remove jdk 1.4 restriction for jcr-tests

Reduce warning noise

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckinTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckoutTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeCancelMergeTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeNodeTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeSubNodeTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionLabelTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckinTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckinTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckinTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckinTest.java Mon Jan  2 18:53:27 2012
@@ -47,6 +47,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws javax.jcr.RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testIsCheckedOut() throws RepositoryException {
         versionableNode.checkin();
         assertTrue("After calling Node.checkin() on a versionable node N, N.isCheckedOut() must return false", versionableNode.isCheckedOut() == false);
@@ -71,6 +72,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testCheckinRemovesPredecessorProperty() throws RepositoryException {
 
         versionableNode.checkin();
@@ -101,6 +103,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testPredecessorIsCopiedToNewVersion() throws RepositoryException {
 
         Value[] nPredecessorsValue = versionableNode.getProperty(jcrPredecessors).getValues();
@@ -134,6 +137,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testMultipleCheckinHasNoEffect() throws RepositoryException {
 
         Version v = versionableNode.checkin();
@@ -172,6 +176,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testBaseVersionAfterCheckin() throws RepositoryException {
         Version v = versionableNode.checkin();
         Value baseVersionRef = versionableNode.getProperty(jcrBaseVersion).getValue();
@@ -200,6 +205,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testCheckinWithPendingChanges() throws RepositoryException {
         try {
             // modify node without calling save()
@@ -237,6 +243,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testIsNotCheckedOut() throws RepositoryException {
         versionableNode.checkin();
         boolean isCheckedOut = versionableNode.isCheckedOut();
@@ -263,6 +270,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testCheckinCreatesNewVersion() throws RepositoryException {
 
         long initialNumberOfVersions = getNumberOfVersions(versionableNode.getVersionHistory());
@@ -293,6 +301,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testCheckinNonVersionableNode() throws RepositoryException {
         try {
             nonVersionableNode.checkin();

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckoutTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckoutTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckoutTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/CheckoutTest.java Mon Jan  2 18:53:27 2012
@@ -52,6 +52,7 @@ public class CheckoutTest extends Abstra
      * Test if Node.isCheckedOut() returns true, if the versionable node has
      * been checked out before.
      */
+    @SuppressWarnings("deprecation")
     public void testIsCheckedOut() throws RepositoryException {
         versionableNode.checkout();
         assertTrue("After calling Node.checkout() a versionable node N, N.isCheckedOut() must return true.", versionableNode.isCheckedOut());
@@ -127,6 +128,7 @@ public class CheckoutTest extends Abstra
     /**
      * Test calling Node.checkout() on a non-versionable node.
      */
+    @SuppressWarnings("deprecation")
     public void testCheckoutNonVersionableNode() throws RepositoryException {
         try {
             nonVersionableNode.checkout();
@@ -155,6 +157,7 @@ public class CheckoutTest extends Abstra
      * Test if Node.checkout() doesn't throw any exception if the versionable
      * node has been checked out before.
      */
+    @SuppressWarnings("deprecation")
     public void testCheckoutTwiceDoesNotThrow() throws RepositoryException {
         versionableNode.checkout();
         versionableNode.checkout();
@@ -176,6 +179,7 @@ public class CheckoutTest extends Abstra
      * Test if Node.checkout() copies the node's jcr:baseVersion to node's
      * jcr:predecessors property (no save required).
      */
+    @SuppressWarnings("deprecation")
     public void testCheckoutCopiesBaseValueToPredecessorProperty() throws RepositoryException {
         Value baseVersionValue = versionableNode.getProperty(jcrBaseVersion).getValue();
         versionableNode.checkout();

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeCancelMergeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeCancelMergeTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeCancelMergeTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeCancelMergeTest.java Mon Jan  2 18:53:27 2012
@@ -58,6 +58,7 @@ public class MergeCancelMergeTest extend
      * the jcr:mergeFailed property of N. <br> without adding it to
      * jcr:predecessors.<br> Branches will not be joined.<br>
      */
+    @SuppressWarnings("deprecation")
     public void testMergeNodeCancelMerge() throws RepositoryException {
         // create 2 independent versions for a node and its corresponding node
         // so merge fails for this node

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeNodeTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeNodeTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeNodeTest.java Mon Jan  2 18:53:27 2012
@@ -67,6 +67,7 @@ public class MergeNodeTest extends Abstr
      * Node.merge(): InvalidItemStateException if unsaved changes within the
      * current Session<br>
      */
+    @SuppressWarnings("deprecation")
     public void testMergeNodeWithUnsavedStates() throws RepositoryException {
         // set a property and do not save workspace
         nodeToMerge.setProperty(propertyName1, CHANGED_STRING);
@@ -97,6 +98,7 @@ public class MergeNodeTest extends Abstr
     /**
      * Perform a merge on a node with a unkwnown workspacename
      */
+    @SuppressWarnings("deprecation")
     public void testMergeUnknownWorkspaceName() throws RepositoryException {
         try {
             nodeToMerge.merge(getNonExistingWorkspaceName(superuser), false);
@@ -122,6 +124,7 @@ public class MergeNodeTest extends Abstr
      * indicated workspace <br> then the merge method returns quietly and no
      * changes are made.<br>
      */
+    @SuppressWarnings("deprecation")
     public void testMergeNodeNonCorrespondingNode() throws RepositoryException {
         // create new node - this node has no corresponding node in default workspace
         Node subNode = nodeToMerge.addNode(nodeName3, versionableNodeType);
@@ -156,6 +159,7 @@ public class MergeNodeTest extends Abstr
      * successor of, predecessor of, nor identical with V', then the merge
      * result for N is failed<br>
      */
+    @SuppressWarnings("deprecation")
     public void testMergeNodeVersionAmbiguous() throws RepositoryException {
         // create 2 independent versions for a node and its corresponding node
         // so merge fails for this node
@@ -215,6 +219,7 @@ public class MergeNodeTest extends Abstr
      * Node.merge(): bestEffort is true > any merge-failure (represented by the
      * version in the workspace) is reported in the jcrMergeFailed property<br>
      */
+    @SuppressWarnings("deprecation")
     public void testMergeNodeBestEffortTrueCheckMergeFailedProperty() throws RepositoryException {
         // create 2 independent versions for a node and its corresponding node
         // so merge fails for this node
@@ -298,6 +303,7 @@ public class MergeNodeTest extends Abstr
     /**
      * if mergeFailedProperty is present > VersionException<br>
      */
+    @SuppressWarnings("deprecation")
     public void disable_testMergeNodeForceFailure() throws RepositoryException {
         // create 2 independent versions for a node and its corresponding node
         // so merge fails for this node
@@ -359,6 +365,7 @@ public class MergeNodeTest extends Abstr
      * Node.merge(): bestEffort is false and any merge fails a MergeException is
      * thrown.<br>
      */
+    @SuppressWarnings("deprecation")
     public void testMergeNodeBestEffortFalse() throws RepositoryException {
         /// create successor versions for a node
         // so merge fails for this node
@@ -409,6 +416,7 @@ public class MergeNodeTest extends Abstr
      * versionable node is encountered whose corresponding node's base version
      * is on a divergent branch from this node's base version.
      */
+    @SuppressWarnings("deprecation")
     public void testMergeNodeBestEffortFalseAmbiguousVersions() throws RepositoryException {
         /// create 2 independent base versions for a node and its corresponding node
         // so merge fails for this node
@@ -471,6 +479,7 @@ public class MergeNodeTest extends Abstr
      * locked node.
      * @throws NotExecutableException if repository does not support locking.
      */
+    @SuppressWarnings("deprecation")
     public void disable_testMergeLocked()
             throws NotExecutableException, RepositoryException {
 

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeSubNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeSubNodeTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeSubNodeTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/MergeSubNodeTest.java Mon Jan  2 18:53:27 2012
@@ -58,6 +58,7 @@ public class MergeSubNodeTest extends Ab
      * update, then the subnode N is removed<br> retrieve the initialised node
      * to perform operations we need before for this test<br>
      */
+    @SuppressWarnings("deprecation")
     public void disable_testRemoveNodeFromSourceWorkspaceAndMergeWithUpdate() throws RepositoryException {
         // status 'update' for parent
         nodeToMerge.checkin();
@@ -123,6 +124,7 @@ public class MergeSubNodeTest extends Ab
      * on the workspace1 and then merge the one in workspace2 with the one in
      * workspace1 precondition is that the node in workspace2 is checked in
      */
+    @SuppressWarnings("deprecation")
     public void disable_testMergeNodeFromUpdatedSourceWorkspace() throws RepositoryException {
         Node originalNode = testRootNode.getNode(nodeName1);
 
@@ -179,6 +181,7 @@ public class MergeSubNodeTest extends Ab
      * workspace1<br> the node in workspace2 should be updated<br> precondition
      * is that the node in workspace2 is checked in
      */
+    @SuppressWarnings("deprecation")
     public void testMergeNodeFromOlderSourceWorkspace() throws RepositoryException {
         // touch the version on workspace2
         nodeToMerge.checkin();
@@ -223,6 +226,7 @@ public class MergeSubNodeTest extends Ab
      * Node.merge(): bestEffort is true > (sub)node which could not be merged
      * are not affected.<br>
      */
+    @SuppressWarnings("deprecation")
     public void disable_testMergeNodeBestEffortTrue() throws RepositoryException {
         // create 2 new nodes with two independent versions
         // so merge fails for this node
@@ -301,6 +305,7 @@ public class MergeSubNodeTest extends Ab
      * node,<br> a merge test is performed comparing N with its corresponding
      * node in workspace, N'.<br>
      */
+    @SuppressWarnings("deprecation")
     public void disable_testMergeNodeSubNodesMergeTest() throws RepositoryException {
         //setCheckProperty(nodeToMerge);
         nodeToMerge.checkout();

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/OnParentVersionCopyTest.java Mon Jan  2 18:53:27 2012
@@ -54,6 +54,7 @@ public class OnParentVersionCopyTest ext
      *
      * @throws javax.jcr.RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreNode() throws RepositoryException {
         // prepare for node test
         Node childNode = addChildNode(OPVAction);

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java Mon Jan  2 18:53:27 2012
@@ -100,6 +100,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreRootVersionFail() throws RepositoryException {
         try {
             versionableNode.restore(rootVersion, true);
@@ -128,6 +129,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreOnCheckedInNode() throws RepositoryException {
         versionableNode.checkin();
         versionableNode.restore(version, true);
@@ -178,6 +180,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreOnCheckedOutNode() throws RepositoryException {
         versionableNode.restore(version, true);
     }
@@ -223,6 +226,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreSetsIsCheckedOutToFalse() throws RepositoryException {
         versionableNode.restore(version, true);
         assertFalse("Restoring a node sets the jcr:isCheckedOut property to false", versionableNode.isCheckedOut());
@@ -273,6 +277,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreCorrectProperty() throws RepositoryException {
         versionableNode.restore(version, true);
         String value = versionableNode.getProperty(propertyName1).getString();
@@ -328,6 +333,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws javax.jcr.RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreSetsBaseVersion() throws RepositoryException {
         versionableNode.restore(version, true);
         Version baseV = versionableNode.getBaseVersion();
@@ -383,6 +389,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreWithPendingChanges() throws RepositoryException {
         // modify node without calling save()
         try {
@@ -469,6 +476,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreInvalidVersion() throws RepositoryException {
         Version vNode2 = versionableNode2.checkin();
         try {
@@ -502,6 +510,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreInvalidVersion2() throws RepositoryException {
         String invalidName;
         do {
@@ -555,6 +564,7 @@ public class RestoreTest extends Abstrac
      * @throws RepositoryException
      * @see Node#restore(String, boolean)
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreNonVersionableNode() throws RepositoryException {
         try {
             nonVersionableNode.restore("foo", true);
@@ -602,6 +612,7 @@ public class RestoreTest extends Abstrac
      * @throws RepositoryException
      * @see Node#restore(Version, boolean)
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreNonVersionableNode3() throws RepositoryException {
         try {
             nonVersionableNode.restore(version, true);
@@ -631,6 +642,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreWithInvalidVersion() throws RepositoryException {
         Version invalidVersion = versionableNode2.checkin();
         try {
@@ -660,6 +672,7 @@ public class RestoreTest extends Abstrac
      * Tests if restoring the <code>Version</code> of an existing node throws an
      * <code>ItemExistsException</code> if removeExisting is set to FALSE.
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreWithUUIDConflict() throws RepositoryException, NotExecutableException {
         try {
             Node naa = createVersionableNode(versionableNode, nodeName4, versionableNodeType);
@@ -801,6 +814,7 @@ public class RestoreTest extends Abstrac
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void testRestoreRemoved() throws RepositoryException {
         Node parent = versionableNode.getParent();
         String oldName = versionableNode.getName();
@@ -916,6 +930,7 @@ public class RestoreTest extends Abstrac
      * Test the restore of a versionable node using a label.
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreLabel() throws RepositoryException {
         // mark V1 with label test1
         versionableNode.getVersionHistory().addVersionLabel(version.getName(), "test", true);
@@ -944,6 +959,7 @@ public class RestoreTest extends Abstrac
      * Test the restore of the OPV=Version child nodes.
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreName() throws RepositoryException,
             NotExecutableException {
         // V1.0 of versionableNode has no child
@@ -1035,6 +1051,7 @@ public class RestoreTest extends Abstrac
      * Test the child ordering of restored nodes.
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreOrder() throws RepositoryException,
             NotExecutableException {
         // create a test-root that has orderable child nodes
@@ -1240,6 +1257,7 @@ public class RestoreTest extends Abstrac
      * Test the child ordering of restored nodes.
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreOrder2() throws RepositoryException,
             NotExecutableException {
         // create a test-root that has orderable child nodes

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionHistoryTest.java Mon Jan  2 18:53:27 2012
@@ -187,6 +187,7 @@ public class VersionHistoryTest extends 
      *
      * @see javax.jcr.version.VersionHistory#getAllVersions()
      */
+    @SuppressWarnings("deprecation")
     public void testGetAllVersions() throws RepositoryException {
         int cnt = 5;
         Map<String, Version> versions = new HashMap<String, Version>();
@@ -278,6 +279,7 @@ public class VersionHistoryTest extends 
      * Test if UnsupportedRepositoryOperationException is thrown when calling
      * Node.getVersionHistory() on a non-versionable node.
      */
+    @SuppressWarnings("deprecation")
     public void testGetVersionHistoryOnNonVersionableNode() throws RepositoryException {
         try {
             nonVersionableNode.getVersionHistory();
@@ -368,6 +370,7 @@ public class VersionHistoryTest extends 
      * Tests if <code>VersionHistory.cancelMerge(Version)</code> throws an
      * {@link javax.jcr.UnsupportedRepositoryOperationException}
      */
+    @SuppressWarnings("deprecation")
     public void testCancelMerge() throws Exception {
         try {
             vHistory.cancelMerge(version);
@@ -392,6 +395,7 @@ public class VersionHistoryTest extends 
      * Tests if <code>VersionHistory.checkin()</code> throws an {@link
      * javax.jcr.UnsupportedRepositoryOperationException}
      */
+    @SuppressWarnings("deprecation")
     public void testCheckin() throws Exception {
         try {
             vHistory.checkin();
@@ -416,6 +420,7 @@ public class VersionHistoryTest extends 
      * Tests if <code>VersionHistory.checkout()</code> throws an {@link
      * javax.jcr.UnsupportedRepositoryOperationException}
      */
+    @SuppressWarnings("deprecation")
     public void testCheckout() throws Exception {
         try {
             vHistory.checkout();
@@ -440,6 +445,7 @@ public class VersionHistoryTest extends 
      * Tests if <code>VersionHistory.doneMerge(Version)</code> throws an {@link
      * javax.jcr.UnsupportedRepositoryOperationException}
      */
+    @SuppressWarnings("deprecation")
     public void testDoneMerge() throws Exception {
         try {
             vHistory.doneMerge(version);
@@ -472,6 +478,7 @@ public class VersionHistoryTest extends 
      * Tests if <code>VersionHistory.getBaseVersion()</code> throws an {@link
      * javax.jcr.UnsupportedRepositoryOperationException}
      */
+    @SuppressWarnings("deprecation")
     public void testGetBaseVersion() throws Exception {
         try {
             vHistory.getBaseVersion();
@@ -518,6 +525,7 @@ public class VersionHistoryTest extends 
      * Tests if <code>VersionHistory.getLock()</code> throws an {@link
      * javax.jcr.lock.LockException}
      */
+    @SuppressWarnings("deprecation")
     public void testGetLock() throws Exception {
         try {
             vHistory.getLock();
@@ -826,6 +834,7 @@ public class VersionHistoryTest extends 
      * Tests if <code>VersionHistory.lock(boolean, boolean)</code> throws a
      * {@link javax.jcr.lock.LockException}
      */
+    @SuppressWarnings("deprecation")
     public void testLock() throws Exception {
         try {
             vHistory.lock(true, true);
@@ -1006,6 +1015,7 @@ public class VersionHistoryTest extends 
      * Tests if <code>VersionHistory.restoreByLabel(String, boolean)</code>
      * throws an {@link javax.jcr.UnsupportedRepositoryOperationException}
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreByLabel() throws Exception {
         try {
             vHistory.restoreByLabel("abc", true);

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionLabelTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionLabelTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionLabelTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/VersionLabelTest.java Mon Jan  2 18:53:27 2012
@@ -133,6 +133,7 @@ public class VersionLabelTest extends Ab
      *
      * @see VersionHistory#addVersionLabel(String, String, boolean)
      */
+    @SuppressWarnings("deprecation")
     public void testAddVersionCheckVersionLabelsNode() throws RepositoryException {
         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
 
@@ -205,6 +206,7 @@ public class VersionLabelTest extends Ab
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testAddDuplicateVersionLabel() throws RepositoryException {
         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
         try {
@@ -245,6 +247,7 @@ public class VersionLabelTest extends Ab
      * @throws RepositoryException
      * @see VersionHistory#addVersionLabel(String, String, boolean)  with boolan flag equals true.
      */
+    @SuppressWarnings("deprecation")
     public void testMoveLabel() throws RepositoryException {
         vHistory.addVersionLabel(rootVersion.getName(), versionLabel, false);
         try {
@@ -337,6 +340,7 @@ public class VersionLabelTest extends Ab
      * @throws RepositoryException
      * @see javax.jcr.version.VersionHistory#getVersionLabels()
      */
+    @SuppressWarnings("deprecation")
     public void testGetVersionLabels() throws RepositoryException {
 
         Set<String> testLabels = new HashSet<String>(Arrays.asList(vHistory.getVersionLabels()));
@@ -399,6 +403,7 @@ public class VersionLabelTest extends Ab
      * @throws RepositoryException
      * @see VersionHistory#getVersionLabels(javax.jcr.version.Version)
      */
+    @SuppressWarnings("deprecation")
     public void testGetVersionLabelsForVersion() throws RepositoryException {
 
         Set<String> testLabels = new HashSet<String>(Arrays.asList(vHistory.getVersionLabels(rootVersion)));
@@ -462,6 +467,7 @@ public class VersionLabelTest extends Ab
      * @throws javax.jcr.RepositoryException
      * @see javax.jcr.Node#restoreByLabel(String, boolean)
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreByLabelNonVersionableNode() throws RepositoryException {
         try {
             nonVersionableNode.restoreByLabel(versionLabel, true);

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.java Mon Jan  2 18:53:27 2012
@@ -161,6 +161,7 @@ public class WorkspaceRestoreTest extend
      * Test if InvalidItemStateException is thrown if the session affected by
      * Workspace.restore(Version[], boolean) has pending changes.
      */
+    @SuppressWarnings("deprecation")
     public void testWorkspaceRestoreWithPendingChanges() throws RepositoryException {
         versionableNode.checkout();
         try {
@@ -203,6 +204,7 @@ public class WorkspaceRestoreTest extend
      * Test if VersionException is thrown if the specified version array does
      * not contain a version that has a corresponding node in this workspace.
      */
+    @SuppressWarnings("deprecation")
     public void testWorkspaceRestoreHasCorrespondingNode() throws RepositoryException {
         try {
             superuser.getWorkspace().restore(new Version[]{wChildVersion}, false);
@@ -234,6 +236,7 @@ public class WorkspaceRestoreTest extend
      * node in the workspace.</li>
      * </ul>
      */
+    @SuppressWarnings("deprecation")
     public void testWorkspaceRestoreWithParent() throws RepositoryException {
 
         try {
@@ -266,6 +269,7 @@ public class WorkspaceRestoreTest extend
     /**
      * Test if the removeExisting-flag removes an existing node in case of uuid conflict.
      */
+    @SuppressWarnings("deprecation")
     public void testWorkspaceRestoreWithRemoveExisting() throws NotExecutableException, RepositoryException {
         // create version for parentNode of childNode
         superuser.getWorkspace().clone(workspaceName, wVersionableChildNode.getPath(), wVersionableChildNode.getPath(), false);
@@ -309,6 +313,7 @@ public class WorkspaceRestoreTest extend
      * Tests if restoring the <code>Version</code> of an existing node throws an
      * <code>ItemExistsException</code> if removeExisting is set to FALSE.
      */
+    @SuppressWarnings("deprecation")
     public void testWorkspaceRestoreWithUUIDConflict() throws RepositoryException, NotExecutableException {
         try {
             // Verify that nodes used for the test are indeed versionable
@@ -359,6 +364,7 @@ public class WorkspaceRestoreTest extend
     /**
      * Test if workspace-restoring a node works on checked-in node.
      */
+    @SuppressWarnings("deprecation")
     public void testWorkspaceRestoreOnCheckedInNode() throws RepositoryException {
         if (versionableNode.isCheckedOut()) {
             versionableNode.checkin();
@@ -381,6 +387,7 @@ public class WorkspaceRestoreTest extend
     /**
      * Test if workspace-restoring a node works on checked-out node.
      */
+    @SuppressWarnings("deprecation")
     public void testWorkspaceRestoreOnCheckedOutNode() throws RepositoryException {
         if (!versionableNode.isCheckedOut()) {
             versionableNode.checkout();

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/CheckinTest.java Mon Jan  2 18:53:27 2012
@@ -51,6 +51,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws javax.jcr.RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testIsCheckedOut() throws RepositoryException {
         versionableNode.checkin();
         assertTrue("After calling Node.checkin() on a versionable node N, N.isCheckedOut() must return false", versionableNode.isCheckedOut() == false);
@@ -74,6 +75,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testMultipleCheckinHasNoEffect() throws RepositoryException {
 
         Version v = versionableNode.checkin();
@@ -112,6 +114,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testCheckinWithPendingChanges() throws RepositoryException {
         try {
             // modify node without calling save()
@@ -149,6 +152,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testIsNotCheckedOut() throws RepositoryException {
         versionableNode.checkin();
         boolean isCheckedOut = versionableNode.isCheckedOut();
@@ -175,6 +179,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testCheckinCreatesNewVersion() throws RepositoryException {
 
         long initialNumberOfVersions = getNumberOfVersions(versionableNode.getVersionHistory());
@@ -205,6 +210,7 @@ public class CheckinTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testCheckinNonVersionableNode() throws RepositoryException {
         try {
             nonVersionableNode.checkin();

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java?rev=1226515&r1=1226514&r2=1226515&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java (original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/simple/RestoreTest.java Mon Jan  2 18:53:27 2012
@@ -105,6 +105,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreRootVersionFail() throws RepositoryException {
         try {
             versionableNode.restore(rootVersion, true);
@@ -133,6 +134,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreOnCheckedInNode() throws RepositoryException {
         versionableNode.checkin();
         versionableNode.restore(version, true);
@@ -189,6 +191,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreOnCheckedOutNode() throws RepositoryException {
         versionableNode.restore(version, true);
     }
@@ -240,6 +243,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreSetsIsCheckedOutToFalse() throws RepositoryException {
         versionableNode.restore(version, true);
         assertFalse("Restoring a node sets the jcr:isCheckedOut property to false", versionableNode.isCheckedOut());
@@ -296,6 +300,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreCorrectProperty() throws RepositoryException {
         versionableNode.restore(version, true);
         String value = versionableNode.getProperty(propertyName1).getString();
@@ -357,6 +362,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreWithPendingChanges() throws RepositoryException {
         // modify node without calling save()
         try {
@@ -443,6 +449,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreInvalidVersion() throws RepositoryException {
         Version vNode2 = versionableNode2.checkin();
         try {
@@ -476,6 +483,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreInvalidVersion2() throws RepositoryException {
         String invalidName;
         do {
@@ -529,6 +537,7 @@ public class RestoreTest extends Abstrac
      * @throws RepositoryException
      * @see Node#restore(String, boolean)
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreNonVersionableNode() throws RepositoryException {
         try {
             nonVersionableNode.restore("foo", true);
@@ -576,6 +585,7 @@ public class RestoreTest extends Abstrac
      * @throws RepositoryException
      * @see Node#restore(Version, boolean)
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreNonVersionableNode3() throws RepositoryException {
         try {
             nonVersionableNode.restore(version, true);
@@ -605,6 +615,7 @@ public class RestoreTest extends Abstrac
      *
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreWithInvalidVersion() throws RepositoryException {
         Version invalidVersion = versionableNode2.checkin();
         try {
@@ -634,6 +645,7 @@ public class RestoreTest extends Abstrac
      * Tests if restoring the <code>Version</code> of an existing node throws an
      * <code>ItemExistsException</code> if removeExisting is set to FALSE.
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreWithUUIDConflict() throws RepositoryException, NotExecutableException {
         try {
             Node naa = createVersionableNode(versionableNode, nodeName4, versionableNodeType);
@@ -755,6 +767,7 @@ public class RestoreTest extends Abstrac
         }
     }
 
+    @SuppressWarnings("deprecation")
     public void testRestoreChild1() throws RepositoryException {
         versionableNode.addNode("child1");
         versionableNode.getSession().save();
@@ -859,6 +872,7 @@ public class RestoreTest extends Abstrac
      * Test the restore of a versionable node using a label.
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreLabel() throws RepositoryException {
         // mark V1 with label test1
         versionableNode.getVersionHistory().addVersionLabel(version.getName(), "test", true);
@@ -887,6 +901,7 @@ public class RestoreTest extends Abstrac
      * Test the restore of the OPV=Version child nodes.
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreName() throws RepositoryException,
             NotExecutableException {
         // V1.0 of versionableNode has no child
@@ -967,6 +982,7 @@ public class RestoreTest extends Abstrac
      * Test the child ordering of restored nodes.
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreOrder() throws RepositoryException,
             NotExecutableException {
         // create a test-root that has orderable child nodes
@@ -1172,6 +1188,7 @@ public class RestoreTest extends Abstrac
      * Test the child ordering of restored nodes.
      * @throws RepositoryException
      */
+    @SuppressWarnings("deprecation")
     public void testRestoreOrder2() throws RepositoryException,
             NotExecutableException {
         // create a test-root that has orderable child nodes
@@ -1377,6 +1394,7 @@ public class RestoreTest extends Abstrac
      * Tests if restore on simple versioning creates a new version that is
      * in the correct linear order.
      */
+    @SuppressWarnings("deprecation")
     public void testLinearVersions() throws Exception {
         // first get all linear versions
         VersionIterator iter = versionableNode.getVersionHistory().getAllLinearVersions();