fix(registry): fix logic error in InteractionEntry identifier checking and fix InteractionIdentifier#equals to actually recursively check parent identifiers
This commit is contained in:
parent
0973016a74
commit
8495659364
@ -80,7 +80,7 @@ public class InteractionIdentifier {
|
|||||||
return false;
|
return false;
|
||||||
if (!name().equals(ident.name()))
|
if (!name().equals(ident.name()))
|
||||||
return false;
|
return false;
|
||||||
return Objects.equals(ident, obj);
|
return Objects.equals(parent(), ident.parent());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -36,7 +36,7 @@ public class InteractionEntry {
|
|||||||
public InteractionEntry addMethod(InteractionMethod method) {
|
public InteractionEntry addMethod(InteractionMethod method) {
|
||||||
InteractionIdentifier identifier = method.identifier();
|
InteractionIdentifier identifier = method.identifier();
|
||||||
|
|
||||||
if (this.identifier().equals(identifier))
|
if (!this.identifier().equals(identifier))
|
||||||
throw new IllegalArgumentException("Method's identifier did not equal the entry's identifier");
|
throw new IllegalArgumentException("Method's identifier did not equal the entry's identifier");
|
||||||
|
|
||||||
this.methods.add(method);
|
this.methods.add(method);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user