Fixes a stack overflow reported by James B. Byrne, investigated by Danny van Heumen.
This commit is contained in:
parent
50e8ac2616
commit
a4f7d4ff8d
@ -316,13 +316,16 @@ public abstract class Candidate<T extends Candidate<?>>
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
baseEqualsCandidateBase = base.equals(candidateBase);
|
// If this and candidate are bases of themselves, their bases are
|
||||||
|
// considered equal.
|
||||||
|
baseEqualsCandidateBase
|
||||||
|
= (base == this && candidateBase == candidate)
|
||||||
|
|| base.equals(candidateBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
//compare other properties
|
//compare other properties
|
||||||
return
|
return
|
||||||
(baseEqualsCandidateBase
|
baseEqualsCandidateBase
|
||||||
|| (base == this && candidateBase == candidate))
|
|
||||||
&& getPriority() == candidate.getPriority()
|
&& getPriority() == candidate.getPriority()
|
||||||
&& getType() == candidate.getType()
|
&& getType() == candidate.getType()
|
||||||
&& getFoundation().equals(candidate.getFoundation());
|
&& getFoundation().equals(candidate.getFoundation());
|
||||||
@ -995,4 +998,4 @@ public abstract class Candidate<T extends Candidate<?>>
|
|||||||
{
|
{
|
||||||
this.tcpType = tcpType;
|
this.tcpType = tcpType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user