#5282 Use null session in referencing objects view
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 23 Nov 2015 15:31:18 +0000 (16:31 +0100)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 23 Nov 2015 15:31:18 +0000 (16:31 +0100)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/NullSession.java

index 12b2ef1..7895964 100644 (file)
@@ -82,7 +82,7 @@ public class ReferencingObjectsView extends AbstractCdmViewPart {
        private ICdmEntitySession cdmEntitySession;
 
        public ReferencingObjectsView() {
-           cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
+           cdmEntitySession = CdmStore.getCurrentSessionManager().bindNullSession();
        }
 
        /* (non-Javadoc)
index 9efd8ec..22aa7be 100644 (file)
@@ -203,6 +203,9 @@ public class NullSession implements ICdmEntitySession {
      */
     @Override
     public List<String> getPropertyPaths(Object obj) {
+        if(sessionOwner == null) {
+            return null;
+        }
         Map<Object, List<String>> propertyPathsMap = sessionOwner.getPropertyPathsMap();
         if(propertyPathsMap == null || propertyPathsMap.isEmpty()) {
             return null;