You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/09/11 00:08:45 UTC

[21/50] isis git commit: ISIS-1194: PersistenceSession, inlining createInstance.

ISIS-1194: PersistenceSession, inlining createInstance.


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/4776d59e
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/4776d59e
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/4776d59e

Branch: refs/heads/master
Commit: 4776d59ec022d9626e9e5a4bcec4e7d0a50597c4
Parents: 16734b7
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Sep 10 15:31:49 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Sep 10 15:31:49 2015 +0100

----------------------------------------------------------------------
 .../system/persistence/PersistenceSession.java      | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/4776d59e/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
index 38e45c2..08b45f0 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/system/persistence/PersistenceSession.java
@@ -387,7 +387,7 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
      * {@link org.apache.isis.applib.DomainObjectContainer}.
      */
     public ObjectAdapter createTransientInstance(final ObjectSpecification objectSpec) {
-        return createInstance(objectSpec, Variant.TRANSIENT);
+        return createInstance(objectSpec, Variant.TRANSIENT, null);
     }
 
     public ObjectAdapter createViewModelInstance(final ObjectSpecification objectSpec, final String memento) {
@@ -401,20 +401,6 @@ public class PersistenceSession implements TransactionalResource, SessionScopedC
 
     private ObjectAdapter createInstance(
             final ObjectSpecification objectSpec,
-            final Variant variant) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("creating " + variant + " instance of " + objectSpec);
-        }
-        final Object pojo = instantiateAndInjectServices(objectSpec);
-
-
-        final ObjectAdapter adapter = adapterManager.adapterFor(pojo);
-        return initializePropertiesAndDoCallback(adapter);
-    }
-
-
-    private ObjectAdapter createInstance(
-            final ObjectSpecification objectSpec,
             final Variant variant,
             final String memento) {
         if (LOG.isDebugEnabled()) {