Revision 42879 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/impl/DefaultMapContextManager.java

View differences:

DefaultMapContextManager.java
71 71
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager;
72 72
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolPreferences;
73 73
import org.gvsig.tools.ToolsLocator;
74
import org.gvsig.tools.dispose.DisposeUtils;
74 75
import org.gvsig.tools.dynobject.exception.DynMethodException;
75 76
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
76 77
import org.gvsig.tools.observer.Notification;
......
688 689
            if (explorer == null) {
689 690
                return null;
690 691
            }
691
            return (File) call(explorer, "getResourcePath",
692
                    new Class[]{DataStore.class, String.class},
693
                    new Object[]{dataStore, resource});
692
            return explorer.getResourcePath(dataStore, resource);
694 693
        } catch (Exception e) {
695 694
            logger.warn(
696 695
                    "Can't locate a specific legend provided by the explorer "
697 696
                    + explorer, e);
698 697
            return null;
699 698
        } finally {
700
            if (explorer != null) {
701
                explorer.dispose();
702
                explorer = null;
703
            }
699
            DisposeUtils.disposeQuietly(explorer);
704 700
        }
705 701
    }
706 702

  

Also available in: Unified diff