db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattba...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/otm/copy ReflectiveObjectCopyStrategy.java
Date Wed, 09 Jul 2003 00:14:39 GMT
mattbaird    2003/07/08 17:14:39

  Modified:    src/test/org/apache/ojb/otm SwizzleTests.java
               src/java/org/apache/ojb/otm/copy
                        ReflectiveObjectCopyStrategy.java
  Log:
  minor changes
  
  Revision  Changes    Path
  1.9       +0 -1      db-ojb/src/test/org/apache/ojb/otm/SwizzleTests.java
  
  Index: SwizzleTests.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/otm/SwizzleTests.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SwizzleTests.java	8 Jul 2003 23:56:29 -0000	1.8
  +++ SwizzleTests.java	9 Jul 2003 00:14:39 -0000	1.9
  @@ -230,7 +230,6 @@
   		tx.begin();
   		TestClassA a2 = (TestClassA) _conn.getObjectByIdentity(oid);
   		assertTrue(a2.getB() != null);
  -		System.out.println("a2.getB().getValue1()" + a2.getB().getValue1());
   		assertTrue(a2.getB().getValue1().equals("goodbye there"));
   		tx.commit();
   		clearTestData();
  
  
  
  1.6       +1 -1      db-ojb/src/java/org/apache/ojb/otm/copy/ReflectiveObjectCopyStrategy.java
  
  Index: ReflectiveObjectCopyStrategy.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/otm/copy/ReflectiveObjectCopyStrategy.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ReflectiveObjectCopyStrategy.java	9 Jul 2003 00:07:44 -0000	1.5
  +++ ReflectiveObjectCopyStrategy.java	9 Jul 2003 00:14:39 -0000	1.6
  @@ -116,6 +116,7 @@
   
   	private static final Object clone(Object toCopy, final Map objMap, final Map metadataMap,
PersistenceBroker broker)
   	{
  +		if (objMap.containsKey(toCopy)) return objMap.get(toCopy);
   		/**
   		 * eliminate some up front
   		 */
  @@ -161,7 +162,6 @@
   		 * first, check to make sure we aren't recursing to some object that we've already copied.
   		 * if the toCopy is in the objMap, just return it.
   		 */
  -		if (objMap.containsKey(toCopy)) return objMap.get(toCopy);
   		final Class objClass = toCopy.getClass();
   		final Object retval;
   		if (objClass.isArray())
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message