cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1049256 - in /cayenne/sandbox/cayenne-mixin/trunk: pom.xml src/main/java/org/apache/cayenne/mixin/changeset/ChangeSet.java src/main/java/org/apache/cayenne/mixin/changeset/GenericChangeSet.java
Date Tue, 14 Dec 2010 20:30:40 GMT
Author: aadamchik
Date: Tue Dec 14 20:30:40 2010
New Revision: 1049256

URL: http://svn.apache.org/viewvc?rev=1049256&view=rev
Log:
changeset package

cleaning up

Modified:
    cayenne/sandbox/cayenne-mixin/trunk/pom.xml
    cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/ChangeSet.java
    cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/GenericChangeSet.java

Modified: cayenne/sandbox/cayenne-mixin/trunk/pom.xml
URL: http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-mixin/trunk/pom.xml?rev=1049256&r1=1049255&r2=1049256&view=diff
==============================================================================
--- cayenne/sandbox/cayenne-mixin/trunk/pom.xml (original)
+++ cayenne/sandbox/cayenne-mixin/trunk/pom.xml Tue Dec 14 20:30:40 2010
@@ -8,7 +8,7 @@
 		<version>3.1M1</version>
 	</parent>
 	<artifactId>cayenne-mixin</artifactId>
-	<version>3.1.0.7</version>
+	<version>3.1.0.8</version>
 	<name>Library: cayenne-mixin</name>
 	<packaging>jar</packaging>
 	<properties>

Modified: cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/ChangeSet.java
URL: http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/ChangeSet.java?rev=1049256&r1=1049255&r2=1049256&view=diff
==============================================================================
--- cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/ChangeSet.java
(original)
+++ cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/ChangeSet.java
Tue Dec 14 20:30:40 2010
@@ -33,5 +33,9 @@ public interface ChangeSet {
 
     public static final String OBJECT_ID_PROPERTY_NAME = "cayenne:objectId";
 
+    /**
+     * Returns a map of changes for a given object in its context, keyed by property name.
+     * If the object is unchanged, an empty map is returned.
+     */
     Map<String, PropertyChange> getChanges(Persistent object);
 }

Modified: cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/GenericChangeSet.java
URL: http://svn.apache.org/viewvc/cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/GenericChangeSet.java?rev=1049256&r1=1049255&r2=1049256&view=diff
==============================================================================
--- cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/GenericChangeSet.java
(original)
+++ cayenne/sandbox/cayenne-mixin/trunk/src/main/java/org/apache/cayenne/mixin/changeset/GenericChangeSet.java
Tue Dec 14 20:30:40 2010
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.cayenne.mixin.changeset;
 
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -43,13 +44,10 @@ public class GenericChangeSet implements
         this.diff = diff;
     }
 
-    /**
-     * Returns a map of changes for a given object in its context, keyed by property name.
-     * If the object is unchanged, an empty map is returned.
-     */
     @Override
     public Map<String, PropertyChange> getChanges(Persistent object) {
-        return getChanges().get(object.getObjectId());
+        Map<String, PropertyChange> changes = getChanges().get(object.getObjectId());
+        return changes != null ? changes : Collections.EMPTY_MAP;
     }
 
     private Map<ObjectId, Map<String, PropertyChange>> getChanges() {



Mime
View raw message