package com.capitalone.dashboard.model;

public class PipelineCommit extends SCM{

    public PipelineCommit() {
    }

    public PipelineCommit(long timestamp) {
        this.timestamp = timestamp;
    }

    public PipelineCommit(SCM scm, long timestamp){
        super(scm);
        this.timestamp = timestamp;
    }
    private long timestamp;

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    @Override
    public boolean equals(Object o) {
        if(o instanceof PipelineCommit){
            PipelineCommit toCompareTo = (PipelineCommit) o;
            return this.scmRevisionNumber.equals(toCompareTo.scmRevisionNumber);
        }
        return false;
    }

    @Override
    public int hashCode() {
    	int result = scmRevisionNumber.hashCode();
        result = 31 * result + scmRevisionNumber.hashCode();
        return result;
    }
}

@@ -75,16 +75,17 @@
 ds SCM%7B%0A
+%09
 %0A    pub
@@ -492,36 +492,226 @@
 mestamp;%0A    %7D%0A%0A
-    
+%09@Override%0A%09public int hashCode() %7B%0A%09%09final int prime = 31;%0A%09%09int result = 1;%0A%09%09result = prime * result + ((scmRevisionNumber == null) ? 0 : scmRevisionNumber.hashCode());%0A%09%09return result;%0A%09%7D%0A%0A%09
 @Override%0A    pu
@@ -700,28 +700,25 @@
 %0A%09@Override%0A
-    
+%09
 public boole
@@ -739,65 +739,140 @@
 ct o
+bj
 ) %7B%0A
-        
+%09%09if (this == obj)%0A%09%09%09return true;%0A%09%09
 if
+ 
 (o
- instanceof PipelineCommit)%7B%0A            
+bj == null)%0A%09%09%09return false;%0A%09%09if (getClass() != obj.getClass())%0A%09%09%09return false;%0A%09%09
 Pipe
@@ -882,27 +882,21 @@
 eCommit 
-toCompareTo
+other
  = (Pipe
@@ -912,308 +912,213 @@
 t) o
-;%0A            return this.scmRevisionNumber.equals(toCompareTo.scmRevisionNumber);%0A        %7D%0A        return false;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A    %09int result = scmRevisionNumber.hashCode();%0A        result = 31 * result + scmRevisionNumber.hashCode();%0A        return result;%0A    %7D
+bj;%0A%09%09if (scmRevisionNumber == null) %7B%0A%09%09%09if (other.scmRevisionNumber != null)%0A%09%09%09%09return false;%0A%09%09%7D else if (!scmRevisionNumber.equals(other.scmRevisionNumber))%0A%09%09%09return false;%0A%09%09return true;%0A%09%7D%0A    %0A    
 %0A%7D%0A

Fix potential NPE in PipelineCommit