fix ClassCast for Teams
authorAndreas Müller <a.mueller@bgbm.org>
Thu, 14 Nov 2013 12:52:28 +0000 (12:52 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Thu, 14 Nov 2013 12:52:28 +0000 (12:52 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalAuthorTeamSelectionDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TeamSelectionDialog.java

index f43399142cfd9d64b25c9d11dad73b657aae3182..5d9099441bbbafe58bd74977f4176d2dedf8c920 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.model.agent.Team;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.newWizard.NewTeamWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -81,6 +82,6 @@ public class NomenclaturalAuthorTeamSelectionDialog extends
        /** {@inheritDoc} */
        @Override
        protected Team getPersistentObject(UUID uuid) {
-               return (Team) CdmStore.getService(IAgentService.class).load(uuid);
+               return CdmBase.deproxy(CdmStore.getService(IAgentService.class).load(uuid), Team.class) ;
        }
 }
index ec2e3fb76f7fefa3391df0e638e51c5b580738f5..923a26a4ddb9a5a258100aacaa8a5e5e824f578f 100644 (file)
@@ -17,6 +17,7 @@ import org.eclipse.swt.widgets.Shell;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IAgentService;
 import eu.etaxonomy.cdm.model.agent.Team;
+import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
 import eu.etaxonomy.taxeditor.newWizard.NewTeamWizard;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -85,6 +86,6 @@ public class TeamSelectionDialog extends
        /** {@inheritDoc} */
        @Override
        protected Team getPersistentObject(UUID uuid) {
-               return (Team) CdmStore.getService(IAgentService.class).load(uuid);
+               return CdmBase.deproxy(CdmStore.getService(IAgentService.class).load(uuid), Team.class);
        }
 }