feat: Adds a toString to MappingCandidateHarvester.

This commit is contained in:
Boris Grozev 2016-11-16 16:32:55 -06:00
parent 6bc252fdd4
commit d538ca30c0

View File

@ -100,14 +100,12 @@ public class MappingCandidateHarvester
if (face == null || mask == null)
{
logger.warning("Harvester not configured: face=" + face
+ ", mask="+mask);
+ ", mask=" + mask);
return null;
}
/*
* Report the LocalCandidates gathered by this CandidateHarvester so
* that the harvest is sure to be considered successful.
*/
// Report the LocalCandidates gathered by this CandidateHarvester so
// that the harvest is sure to be considered successful.
Collection<LocalCandidate> candidates = new HashSet<>();
for (Candidate<?> cand : component.getLocalCandidates())
@ -164,4 +162,18 @@ public class MappingCandidateHarvester
{
return face;
}
/**
* {@inheritDoc}
*/
@Override
public String toString()
{
TransportAddress face = getFace();
TransportAddress mask = getMask();
return
this.getClass().getName()
+ ", face=" + (face == null ? "null" : face.getAddress())
+ ", mask=" + (mask == null ? "null" : mask.getAddress());
}
}