cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1358357 - in /cayenne/main/trunk/framework: cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/ac...
Date Fri, 06 Jul 2012 19:12:05 GMT
Author: aadamchik
Date: Fri Jul  6 19:12:04 2012
New Revision: 1358357

URL: http://svn.apache.org/viewvc?rev=1358357&view=rev
Log:
CAY-1718 Remove everything deprecated in 3.1

in progress

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/MockDataNode.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/MapLoaderLoadTest.java
    cayenne/main/trunk/framework/cayenne-wocompat-unpublished/src/test/java/org/apache/cayenne/wocompat/EOModelProcessorTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java?rev=1358357&r1=1358356&r2=1358357&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
Fri Jul  6 19:12:04 2012
@@ -570,12 +570,6 @@ public class DataDomain implements Query
             if (sharedSnapshotCache != null) {
                 sharedSnapshotCache.shutdown();
             }
-
-            // deprecated - noop code for backwards compatibility as DataNode shutdown is
-            // no longer needed
-            for (DataNode node : getDataNodes()) {
-                node.shutdown();
-            }
         }
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java?rev=1358357&r1=1358356&r2=1358357&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataNode.java
Fri Jul  6 19:12:04 2012
@@ -322,15 +322,6 @@ public class DataNode implements QueryEn
         this.entityResolver = entityResolver;
     }
 
-    /**
-     * @deprecated since 3.1 does nothing as pool shutdown is performed by the DI
-     *             container.
-     */
-    @Deprecated
-    public void shutdown() {
-        // noop
-    }
-
     // a read-through DataSource that ensures returning the same connection within
     // transaction.
     final class TransactionDataSource implements DataSource {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java?rev=1358357&r1=1358356&r2=1358357&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/DataMap.java
Fri Jul  6 19:12:04 2012
@@ -19,7 +19,6 @@
 
 package org.apache.cayenne.map;
 
-import java.io.PrintWriter;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -300,22 +299,6 @@ public class DataMap implements Serializ
     }
 
     /**
-     * Prints itself as a well-formed complete XML document. In comparison,
-     * {@link #encodeAsXML(XMLEncoder)}stores DataMap assuming it is a part of a bigger
-     * document.
-     * 
-     * @since 1.1
-     * @deprecated since 3.1, as {@link XMLSerializable} objects should only save XML
-     *             segments. Saving full XML files is responsibilty of the callers.
-     */
-    @Deprecated
-    public void encodeAsXML(PrintWriter pw) {
-        XMLEncoder encoder = new XMLEncoder(pw, "\t");
-        encoder.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
-        encodeAsXML(encoder);
-    }
-
-    /**
      * Prints itself as XML to the provided PrintWriter.
      * 
      * @since 1.1

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java?rev=1358357&r1=1358356&r2=1358357&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataDomainTest.java
Fri Jul  6 19:12:04 2012
@@ -222,21 +222,9 @@ public class DataDomainTest extends Serv
 
         final boolean[] nodeShutdown = new boolean[2];
 
-        DataNode n1 = new DataNode("N1") {
+        DataNode n1 = new DataNode("N1");
 
-            @Override
-            public synchronized void shutdown() {
-                nodeShutdown[0] = true;
-            }
-        };
-
-        DataNode n2 = new DataNode("N2") {
-
-            @Override
-            public synchronized void shutdown() {
-                nodeShutdown[1] = true;
-            }
-        };
+        DataNode n2 = new DataNode("N2");
         n1.setJdbcEventLogger(logger);
 
         domain.addNode(n1);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/MockDataNode.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/MockDataNode.java?rev=1358357&r1=1358356&r2=1358357&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/MockDataNode.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/MockDataNode.java
Fri Jul  6 19:12:04 2012
@@ -187,11 +187,6 @@ public class MockDataNode extends DataNo
     }
 
     @Override
-    public void shutdown() {
-        node.shutdown();
-    }
-
-    @Override
     public String toString() {
         return node.toString();
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/MapLoaderLoadTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/MapLoaderLoadTest.java?rev=1358357&r1=1358356&r2=1358357&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/MapLoaderLoadTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/MapLoaderLoadTest.java
Fri Jul  6 19:12:04 2012
@@ -36,6 +36,7 @@ import org.apache.cayenne.test.file.File
 import org.apache.cayenne.testdo.embeddable.Embeddable1;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.Gallery;
+import org.apache.cayenne.util.XMLEncoder;
 import org.xml.sax.InputSource;
 
 public class MapLoaderLoadTest extends TestCase {
@@ -90,10 +91,10 @@ public class MapLoaderLoadTest extends T
         // test procedures
         Procedure procedure = map.getProcedure("cayenne_tst_upd_proc");
         assertNotNull(procedure);
-        List params = procedure.getCallParameters();
+        List<ProcedureParameter> params = procedure.getCallParameters();
         assertNotNull(params);
         assertEquals(1, params.size());
-        ProcedureParameter param = (ProcedureParameter) params.get(0);
+        ProcedureParameter param = params.get(0);
         assertNotNull(param);
         assertEquals("paintingPrice", param.getName());
         assertEquals(ProcedureParameter.IN_PARAMETER, param.getDirection());
@@ -122,7 +123,7 @@ public class MapLoaderLoadTest extends T
         // encode map
         File file = new File(FileUtil.baseTestDirectory(), "testmap_generated.map.xml");
         PrintWriter pw = new PrintWriter(new FileOutputStream(file));
-        map.encodeAsXML(pw);
+        map.encodeAsXML(new XMLEncoder(pw));
         pw.close();
     }
 

Modified: cayenne/main/trunk/framework/cayenne-wocompat-unpublished/src/test/java/org/apache/cayenne/wocompat/EOModelProcessorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-wocompat-unpublished/src/test/java/org/apache/cayenne/wocompat/EOModelProcessorTest.java?rev=1358357&r1=1358356&r2=1358357&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-wocompat-unpublished/src/test/java/org/apache/cayenne/wocompat/EOModelProcessorTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-wocompat-unpublished/src/test/java/org/apache/cayenne/wocompat/EOModelProcessorTest.java
Fri Jul  6 19:12:04 2012
@@ -33,6 +33,7 @@ import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.map.ObjRelationship;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.util.XMLEncoder;
 
 public class EOModelProcessorTest extends TestCase {
 
@@ -103,7 +104,7 @@ public class EOModelProcessorTest extend
 
         assertSame(map.getObjEntity("ExhibitType"), eoQuery.getRoot());
 
-        Collection bindings = eoQuery.getBindingNames();
+        Collection<?> bindings = eoQuery.getBindingNames();
         assertNotNull(bindings);
         assertEquals(3, bindings.size());
         assertEquals("java.lang.String", eoQuery.bindingClass("x"));
@@ -167,7 +168,7 @@ public class EOModelProcessorTest extend
 
         // storing data map may uncover some inconsistencies
         PrintWriter mockupWriter = new NullPrintWriter();
-        map.encodeAsXML(mockupWriter);
+        map.encodeAsXML(new XMLEncoder(mockupWriter));
     }
 
     class NullPrintWriter extends PrintWriter {



Mime
View raw message