Fixes typos, warnings, repetitive method invocations.

This commit is contained in:
lubomir.marinov 2013-11-13 21:46:37 +00:00
parent a83c5b4be5
commit a0f6622934
2 changed files with 15 additions and 10 deletions

View File

@ -91,7 +91,7 @@ public class Agent
= new CandidateHarvesterSet(); = new CandidateHarvesterSet();
/** /**
* Manages statisics about harvesting time. * Manages statistics about harvesting time.
*/ */
private HarvestStatistics harvestStats = new HarvestStatistics(); private HarvestStatistics harvestStats = new HarvestStatistics();
@ -1784,24 +1784,29 @@ public class Agent
continue; continue;
} }
Candidate localCnd = selectedPair.getLocalCandidate(); Candidate<?> localCnd = selectedPair.getLocalCandidate();
TransportAddress serverAddr = localCnd.getStunServerAddress(); TransportAddress serverAddr = localCnd.getStunServerAddress();
TransportAddress relayAddr = localCnd.getRelayServerAddress();
buf.append(localCnd.getType()); buf.append(localCnd.getType());
if(serverAddr != null) if(serverAddr != null)
{ {
buf.append(" (STUN server = "); buf.append(" (STUN server = ");
buf.append(localCnd.getStunServerAddress()); buf.append(serverAddr);
buf.append(")"); buf.append(")");
} }
else if(relayAddr != null) else
{ {
buf.append(" (relay = "); TransportAddress relayAddr
buf.append(localCnd.getRelayServerAddress()); = localCnd.getRelayServerAddress();
buf.append(")");
if(relayAddr != null)
{
buf.append(" (relay = ");
buf.append(relayAddr);
buf.append(")");
}
} }
logger.info(buf.toString()); logger.info(buf.toString());
} }

View File

@ -28,14 +28,14 @@ public class CandidateAttribute extends AttributeField
/** /**
* The Candidate that we will be encapsulating. * The Candidate that we will be encapsulating.
*/ */
private final Candidate candidate; private final Candidate<?> candidate;
/** /**
* Creates an attribute instance * Creates an attribute instance
* *
* @param candidate the Candidate * @param candidate the Candidate
*/ */
public CandidateAttribute(Candidate candidate) public CandidateAttribute(Candidate<?> candidate)
{ {
this.candidate = candidate; this.candidate = candidate;
} }