Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f22cac35 authored by Jérôme David's avatar Jérôme David
Browse files

equality between URI in diff method uses equals instead of ==

parent 7f7e9e50
No related branches found
No related tags found
No related merge requests found
...@@ -520,9 +520,9 @@ public class BasicAlignment implements Alignment { ...@@ -520,9 +520,9 @@ public class BasicAlignment implements Alignment {
*/ */
public Alignment diff(Alignment align) throws AlignmentException { public Alignment diff(Alignment align) throws AlignmentException {
// Could also test: onto1 == getOntologyObject1(); // Could also test: onto1 == getOntologyObject1();
if ( onto1.getURI() != align.getOntology1URI() ) if ( !onto1.getURI().equals(align.getOntology1URI()) )
throw new AlignmentException("Can only diff alignments with same ontologies"); throw new AlignmentException("Can only diff alignments with same ontologies");
if ( onto2.getURI() != align.getOntology2URI() ) if ( !onto2.getURI().equals(align.getOntology2URI()) )
throw new AlignmentException("Can only diff alignments with same ontologies"); throw new AlignmentException("Can only diff alignments with same ontologies");
BasicAlignment result = createNewAlignment( onto1, onto2 ); BasicAlignment result = createNewAlignment( onto1, onto2 );
for ( Cell c1 : this ) { for ( Cell c1 : this ) {
......
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