Revision 42609 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/resource/impl/DefaultResourceManager.java

View differences:

DefaultResourceManager.java
301 301
			throws InitializeException {
302 302

  
303 303
		try {
304
		    String name;
305
		    try {
306
		       name= (String)params.getDynValue("name");
307
		    }catch (DynFieldNotFoundException nfe){
308
		        try{
309
		           File file= (File)params.getDynValue("file");
310
		           name= file.getAbsolutePath();
311
		        }catch(DynFieldNotFoundException nfe1){
312
		            throw new InitializeException(params.getTypeName(), nfe1);
313
		        }
314
		    }
304
                    String name = params.getResurceID();
315 305
		    Resource res = (Resource)(this.resources.get(name));
316 306
		    if( res!=null ) {
317 307
		        return (AbstractResource)res;
318 308
		    }
319
			return addResource((AbstractResource) createResource(params));
309
                    return addResource((AbstractResource) createResource(params));
320 310
		} catch (AccessResourceException e) {
321 311
			throw new InitializeException(params.getTypeName(), e);
322 312
		}

Also available in: Unified diff