Skip to content
Snippets Groups Projects
Commit ed54ee29 authored by Dominique Marcadet's avatar Dominique Marcadet
Browse files

hash and equals use only required attributes in NsIdentification

parent 18484647
No related branches found
No related tags found
1 merge request!22Resolve "load .AppNS and .snsd files"
......@@ -47,7 +47,8 @@ public class NsIdentification {
@Override
public int hashCode() {
return Objects.hash( id, release, revision, version );
// Only id and version are required, revision and release are optional
return Objects.hash( id, version );
}
@Override
......@@ -56,8 +57,7 @@ public class NsIdentification {
if( obj == null ) return false;
if( getClass() != obj.getClass() ) return false;
NsIdentification other = ( NsIdentification ) obj;
return Objects.equals( id, other.id ) && Objects.equals( release, other.release )
&& Objects.equals( revision, other.revision ) && Objects.equals( version, other.version );
return Objects.equals( id, other.id ) && Objects.equals( version, other.version );
}
@Override
......@@ -68,4 +68,5 @@ public class NsIdentification {
+ ( release != null ? "release=" + release : "" ) + "]";
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment