Source:
protected Stacks getStacks(String url, String jobName, int cacheType, IProgressMonitor monitor) { Stacks stacks = null; try { Trace.trace(Trace.STRING_FINEST, "Locating or downloading file for " + url); File f = getCachedFileForURL(url, jobName, cacheType, monitor); if (f != null && f.exists()) { Trace.trace(Trace.STRING_FINEST, "Local file for url exists"); FileInputStream fis = null; try { fis = new FileInputStream(f); Parser p = new Parser(); stacks = p.parse(fis); } finally { close(fis); } } } catch (Exception e) { StacksCoreActivator.pluginLog().logError("Can't access or parse " + url, e ); } if (stacks == null && !monitor.isCanceled() && !url.equals(getStacksUrlFromJar())) { StacksCoreActivator.pluginLog().logWarning("Stacks from "+ url +" can not be read, falling back on default Stacks Client values"); final StacksClient client = new StacksClient(new DefaultStacksClientConfiguration(), new JBTStacksMessages()); IRunnableWithProgress barrierRunnable = new IRunnableWithProgress() { public Object run(IProgressMonitor monitor) throws Exception { StacksCoreActivator.pluginLog().logWarning("BarrierProgressWaitJob - loading Stacks Client values"); return client.getStacks(); } }; BarrierProgressWaitJob fromClientJob = new BarrierProgressWaitJob("Load stacks using stacks client", barrierRunnable); fromClientJob.schedule(); fromClientJob.monitorSafeJoin(monitor); Throwable t = fromClientJob.getThrowable(); Object ret = fromClientJob.getReturnValue(); if( t != null ) { StacksCoreActivator.pluginLog().logError(t); } stacks = (Stacks)ret; } return stacks; }

Target:
protected Stacks getStacks(String url, String jobName, int cacheType, IProgressMonitor monitor) { Stacks stacks = null; try { Trace.trace(Trace.STRING_FINEST, "Locating or downloading file for " + url); File f = getCachedFileForURL(url, jobName, cacheType, monitor); if (f != null && f.exists()) { Trace.trace(Trace.STRING_FINEST, "Local file for url exists"); FileInputStream fis = null; try { fis = new FileInputStream(f); Parser p = new Parser(); stacks = p.parse(fis); } finally { close(fis); } } } catch (Exception e) { StacksCoreActivator.pluginLog().logError("Can't access or parse " + url, e ); } if (stacks == null && !monitor.isCanceled() ) { final boolean useOnline = !url.equals(getStacksUrlFromJar()); StacksCoreActivator.pluginLog().logWarning("Stacks from "+ url +" can not be read, falling back on default Stacks Client values"); DefaultStacksClientConfiguration config = new DefaultStacksClientConfiguration(); config.setOnline(useOnline); final StacksClient client = new StacksClient(config, new JBTStacksMessages()); IRunnableWithProgress barrierRunnable = new IRunnableWithProgress() { public Object run(IProgressMonitor monitor) throws Exception { StacksCoreActivator.pluginLog().logWarning("BarrierProgressWaitJob - loading Stacks Client values"); return client.getStacks(); } }; BarrierProgressWaitJob fromClientJob = new BarrierProgressWaitJob("Load stacks using stacks client", barrierRunnable); fromClientJob.schedule(); fromClientJob.monitorSafeJoin(monitor); Throwable t = fromClientJob.getThrowable(); Object ret = fromClientJob.getReturnValue(); if( t != null ) { StacksCoreActivator.pluginLog().logError(t); } stacks = (Stacks)ret; } return stacks; }