Changeset 10129 in josm for trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetHeaderDownloadTask.java
- Timestamp:
- 2016-04-09T23:24:01+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/ChangesetHeaderDownloadTask.java
r10124 r10129 6 6 import java.awt.Component; 7 7 import java.io.IOException; 8 import java.lang.reflect.InvocationTargetException;9 8 import java.util.Collection; 10 9 import java.util.Collections; 11 10 import java.util.HashSet; 12 11 import java.util.Set; 13 14 import javax.swing.SwingUtilities;15 12 16 13 import org.openstreetmap.josm.Main; … … 20 17 import org.openstreetmap.josm.io.OsmTransferException; 21 18 import org.openstreetmap.josm.tools.CheckParameterUtil; 22 import org.openstreetmap.josm.tools.ExceptionUtil;23 import org.openstreetmap.josm.tools.bugreport.BugReportExceptionHandler;24 19 import org.xml.sax.SAXException; 25 20 … … 74 69 ExceptionDialogUtil.explainException(lastException); 75 70 } 76 Runnable r = new Runnable() { 77 @Override 78 public void run() { 79 ChangesetCache.getInstance().update(downloadedChangesets); 80 } 81 }; 82 83 if (SwingUtilities.isEventDispatchThread()) { 84 r.run(); 85 } else { 86 try { 87 SwingUtilities.invokeAndWait(r); 88 } catch (InterruptedException e) { 89 Main.warn("InterruptedException in "+getClass().getSimpleName()+" while updating changeset cache"); 90 } catch (InvocationTargetException e) { 91 Throwable t = e.getTargetException(); 92 if (t instanceof RuntimeException) { 93 BugReportExceptionHandler.handleException(t); 94 } else if (t instanceof Exception) { 95 ExceptionUtil.explainException(e); 96 } else { 97 BugReportExceptionHandler.handleException(t); 98 } 99 } 100 } 71 updateChangesets(); 101 72 } 102 73 }
Note:
See TracChangeset
for help on using the changeset viewer.