Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
r8443 r8510 71 71 */ 72 72 public PluginDownloadTask(ProgressMonitor monitor, Collection<PluginInformation> toUpdate, String title) { 73 super(title, monitor == null ? NullProgressMonitor.INSTANCE: monitor, false /* don't ignore exceptions */);73 super(title, monitor == null ? NullProgressMonitor.INSTANCE : monitor, false /* don't ignore exceptions */); 74 74 CheckParameterUtil.ensureParameterNotNull(toUpdate, "toUpdate"); 75 75 this.toUpdate.addAll(toUpdate); … … 91 91 protected void cancel() { 92 92 this.canceled = true; 93 synchronized (this) {93 synchronized (this) { 94 94 if (downloadConnection != null) { 95 95 downloadConnection.disconnect(); … … 101 101 protected void finish() {} 102 102 103 protected void download(PluginInformation pi, File file) throws PluginDownloadException {103 protected void download(PluginInformation pi, File file) throws PluginDownloadException { 104 104 if (pi.mainversion > Version.getInstance().getVersion()) { 105 105 ExtendedDialog dialog = new ExtendedDialog( … … 124 124 } 125 125 URL url = new URL(pi.downloadlink); 126 synchronized (this) {126 synchronized (this) { 127 127 downloadConnection = CachedFile.connectFollowingRedirect(url, PLUGIN_MIME_TYPES, null); 128 128 } … … 146 146 throw new PluginDownloadException(e); 147 147 } finally { 148 synchronized (this) {148 synchronized (this) { 149 149 downloadConnection = null; 150 150 } … … 168 168 try { 169 169 download(d, pluginFile); 170 } catch (PluginDownloadException e) {170 } catch (PluginDownloadException e) { 171 171 Main.error(e); 172 172 failed.add(d);
Note:
See TracChangeset
for help on using the changeset viewer.