/[projects]/dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/tasks/Task.java
ViewVC logotype

Diff of /dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/tasks/Task.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2918 by torben, Thu Feb 4 14:40:36 2016 UTC revision 2928 by torben, Fri Feb 5 11:09:02 2016 UTC
# Line 37  public abstract class Task implements Ru Line 37  public abstract class Task implements Ru
37          @Override          @Override
38          public final void run() {          public final void run() {
39                                    
40                    if (this.state == TaskState.STATE_ABORTED) {//if this task as cancelled while still in queue  
41                            return;
42                    }
43                    
44                    
45                    
46                  TaskLogger.getInstance().reset();                  TaskLogger.getInstance().reset();
47                                    
48                  TimingHelper timing = new TimingHelper();                  TimingHelper timing = new TimingHelper();
# Line 56  public abstract class Task implements Ru Line 62  public abstract class Task implements Ru
62                                                    
63                                                    
64                  } catch (Exception e) {                  } catch (Exception e) {
65                            logger.warning("Error during taskrun", e);
66                          this.errorMsg = e.getMessage();                          this.errorMsg = e.getMessage();
                         e.printStackTrace();  
67                          this.state = TaskState.STATE_ABORTED;                          this.state = TaskState.STATE_ABORTED;
68                  }                  }
69                                    
# Line 118  public abstract class Task implements Ru Line 124  public abstract class Task implements Ru
124          }          }
125                    
126          @Override          @Override
127          public final boolean equals(Object o) {          public int hashCode() {
128                    return this.id;
129            }
130            
131            @Override
132            public boolean equals(Object o) {
133                    if (! (o instanceof Task))
134                            return false;
135                    
136                  Task otherTask = (Task) o;                  Task otherTask = (Task) o;
137                                    
138                  return this.getId() == otherTask.getId();                  return this.getId() == otherTask.getId();

Legend:
Removed from v.2918  
changed lines
  Added in v.2928

  ViewVC Help
Powered by ViewVC 1.1.20