Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] [jira] Created: (UDIG-354) ResourceSelectionPage calls IService.members while in the UI Thread

ResourceSelectionPage calls IService.members while in the UI Thread
-------------------------------------------------------------------

         Key: UDIG-354
         URL: http://jira.codehaus.org/browse/UDIG-354
     Project: uDIG
        Type: Bug
    Versions: UDIG 0.9    
    Reporter: Richard Gould
 Assigned to: Jesse Eichar 


Looks like it was intended to thread but this isn't actually done properly.
Resolve should only be called in a separate thread as it blocks.

	public List<IGeoResource> getGeoResources(final IService service) {
		if( geoResources.get(service)==null || geoResources.isEmpty() ){
			final List<IGeoResource> list=new ArrayList<IGeoResource>();
			
			try{
				getContainer().run(false, true, new IRunnableWithProgress(){
	
					public void run(IProgressMonitor monitor) {
						try {
							list.addAll(service.members(monitor));
						} catch (Exception e) {
							//do nothing
						}
					}
					
				});
//				list.addAll(service.members(null));
				}catch (Exception e) {
					//do nothing
				}
				geoResources.put(service, list);
		}
		return geoResources.get(service);
	}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



Back to the top