fixing #4116 (ClassCastException when selecting Euro+Med top level area in Distributi...
authorAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Tue, 11 Mar 2014 17:10:09 +0000 (17:10 +0000)
committerAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Tue, 11 Mar 2014 17:10:09 +0000 (17:10 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java

index db440361160a8f46ebd511e98c725040c951eb09..f2eee39654062951f958317136e902da9a78a13a 100644 (file)
@@ -46,7 +46,7 @@ public class NamedAreaSelectionDialog extends
                AbstractFilteredCdmResourceSelectionDialog<NamedArea> {
 
        private class IncludeNamedAreaVocabulary extends Action {
-               private TermVocabulary<NamedArea> vocabulary;
+               private final TermVocabulary<NamedArea> vocabulary;
 
                /**
                 * Creates a new instance of the class.
@@ -120,7 +120,7 @@ public class NamedAreaSelectionDialog extends
                        for(Object object : vocabulary.getTerms()){
                                CdmBase cdmBaseObject = (CdmBase) object;
                                if(uuid.equals(cdmBaseObject.getUuid())){
-                                       return (NamedArea) cdmBaseObject;
+                                       return CdmBase.deproxy(cdmBaseObject, NamedArea.class);
                                }
                        }
                }