- Timestamp:
- 2017-05-29T15:29:39+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
r11881 r12272 158 158 159 159 public void finish() { 160 if ( !"".equals(duration)) {161 throw new IllegalStateException("This task s has already been finished");160 if (isFinished()) { 161 throw new IllegalStateException("This task has already been finished: " + name); 162 162 } 163 163 duration = tr(" ({0})", Utils.getDurationString(System.currentTimeMillis() - start)); 164 } 165 166 /** 167 * Determines if this task has been finished. 168 * @return {@code true} if this task has been finished 169 */ 170 public boolean isFinished() { 171 return !duration.isEmpty(); 164 172 } 165 173 … … 174 182 if (o == null || getClass() != o.getClass()) return false; 175 183 MeasurableTask that = (MeasurableTask) o; 176 return Objects.equals(name, that.name); 184 return Objects.equals(name, that.name) 185 && isFinished() == that.isFinished(); 177 186 } 178 187
Note:
See TracChangeset
for help on using the changeset viewer.