Fixes warnings.
This commit is contained in:
parent
362722f555
commit
4cc6d4ab72
@ -348,7 +348,7 @@ public class Agent
|
|||||||
|
|
||||||
gatherCandidates(component, preferredPort, minPort, maxPort);
|
gatherCandidates(component, preferredPort, minPort, maxPort);
|
||||||
|
|
||||||
for(Candidate candidate : component.getLocalCandidates())
|
for(Candidate<?> candidate : component.getLocalCandidates())
|
||||||
{
|
{
|
||||||
logger.info("\t" + candidate.getTransportAddress() + " (" +
|
logger.info("\t" + candidate.getTransportAddress() + " (" +
|
||||||
candidate.getType() + ")");
|
candidate.getType() + ")");
|
||||||
@ -692,7 +692,7 @@ public class Agent
|
|||||||
{
|
{
|
||||||
List<LocalCandidate> candidates = component.getLocalCandidates();
|
List<LocalCandidate> candidates = component.getLocalCandidates();
|
||||||
|
|
||||||
for (Candidate cand : candidates)
|
for (Candidate<?> cand : candidates)
|
||||||
foundationsRegistry.assignFoundation(cand);
|
foundationsRegistry.assignFoundation(cand);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -851,8 +851,8 @@ public class Agent
|
|||||||
* check for outgoing Binding Requests.
|
* check for outgoing Binding Requests.
|
||||||
*/
|
*/
|
||||||
private String generateUserName(
|
private String generateUserName(
|
||||||
Candidate candidate1,
|
Candidate<?> candidate1,
|
||||||
Candidate candidate2)
|
Candidate<?> candidate2)
|
||||||
{
|
{
|
||||||
String ret = null;
|
String ret = null;
|
||||||
String ufrag1 = candidate1.getUfrag();
|
String ufrag1 = candidate1.getUfrag();
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import org.ice4j.*;
|
|||||||
* @author Lyubomir Marinov
|
* @author Lyubomir Marinov
|
||||||
*/
|
*/
|
||||||
public abstract class Candidate
|
public abstract class Candidate
|
||||||
<T extends Candidate>
|
<T extends Candidate<?>>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The transport address represented by this candidate.
|
* The transport address represented by this candidate.
|
||||||
@ -291,7 +291,7 @@ public abstract class Candidate
|
|||||||
if( ! (obj instanceof Candidate))
|
if( ! (obj instanceof Candidate))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Candidate targetCandidate = (Candidate)obj;
|
Candidate<?> targetCandidate = (Candidate<?>) obj;
|
||||||
|
|
||||||
//compare candidate addresses
|
//compare candidate addresses
|
||||||
if( ! targetCandidate.getTransportAddress()
|
if( ! targetCandidate.getTransportAddress()
|
||||||
@ -786,7 +786,7 @@ public abstract class Candidate
|
|||||||
* otherwise.
|
* otherwise.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public boolean canReach(Candidate dst)
|
public boolean canReach(Candidate<?> dst)
|
||||||
{
|
{
|
||||||
return getTransportAddress().canReach(dst.getTransportAddress());
|
return getTransportAddress().canReach(dst.getTransportAddress());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -299,7 +299,7 @@ public class CandidatePair
|
|||||||
* @return a reference to the <tt>Candidate</tt> instance that comes from
|
* @return a reference to the <tt>Candidate</tt> instance that comes from
|
||||||
* the controlling agent.
|
* the controlling agent.
|
||||||
*/
|
*/
|
||||||
public Candidate getControllingAgentCandidate()
|
public Candidate<?> getControllingAgentCandidate()
|
||||||
{
|
{
|
||||||
return (getLocalCandidate().getParentComponent().getParentStream()
|
return (getLocalCandidate().getParentComponent().getParentStream()
|
||||||
.getParentAgent().isControlling())
|
.getParentAgent().isControlling())
|
||||||
@ -313,7 +313,7 @@ public class CandidatePair
|
|||||||
* @return a reference to the <tt>Candidate</tt> instance that comes from
|
* @return a reference to the <tt>Candidate</tt> instance that comes from
|
||||||
* the controlled agent.
|
* the controlled agent.
|
||||||
*/
|
*/
|
||||||
public Candidate getControlledAgentCandidate()
|
public Candidate<?> getControlledAgentCandidate()
|
||||||
{
|
{
|
||||||
return (getLocalCandidate().getParentComponent().getParentStream()
|
return (getLocalCandidate().getParentComponent().getParentStream()
|
||||||
.getParentAgent().isControlling())
|
.getParentAgent().isControlling())
|
||||||
|
|||||||
@ -111,7 +111,7 @@ public class Component
|
|||||||
* words, the candidate that we would have used to communicate with the
|
* words, the candidate that we would have used to communicate with the
|
||||||
* remote peer if we hadn't been using ICE.
|
* remote peer if we hadn't been using ICE.
|
||||||
*/
|
*/
|
||||||
private Candidate defaultRemoteCandidate = null;
|
private Candidate<?> defaultRemoteCandidate = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new <tt>Component</tt> with the specified <tt>componentID</tt>
|
* Creates a new <tt>Component</tt> with the specified <tt>componentID</tt>
|
||||||
@ -175,10 +175,10 @@ public class Component
|
|||||||
synchronized(localCandidates)
|
synchronized(localCandidates)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for(Candidate cand : localCandidates)
|
for(Candidate<?> cand : localCandidates)
|
||||||
{
|
{
|
||||||
if (cand.getType() == CandidateType.HOST_CANDIDATE
|
if ((cand.getType() == CandidateType.HOST_CANDIDATE)
|
||||||
&& !cand.isVirtual())
|
&& !cand.isVirtual())
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
@ -519,9 +519,9 @@ public class Component
|
|||||||
|
|
||||||
synchronized(localCandidates)
|
synchronized(localCandidates)
|
||||||
{
|
{
|
||||||
for (Candidate cand : localCandidates)
|
for (Candidate<?> cand : localCandidates)
|
||||||
{
|
{
|
||||||
buff.append("\n" + cand.toString());
|
buff.append('\n').append(cand.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -586,7 +586,7 @@ public class Component
|
|||||||
localCandidates.toArray(candidates);
|
localCandidates.toArray(candidates);
|
||||||
|
|
||||||
//first compute the actual priorities
|
//first compute the actual priorities
|
||||||
for (Candidate cand : candidates)
|
for (Candidate<?> cand : candidates)
|
||||||
{
|
{
|
||||||
if(compat == CompatibilityMode.GTALK)
|
if(compat == CompatibilityMode.GTALK)
|
||||||
{
|
{
|
||||||
@ -612,7 +612,7 @@ public class Component
|
|||||||
* Compares candidates based on their priority.
|
* Compares candidates based on their priority.
|
||||||
*/
|
*/
|
||||||
private static class CandidatePrioritizer
|
private static class CandidatePrioritizer
|
||||||
implements Comparator<Candidate>
|
implements Comparator<Candidate<?>>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Compares the two <tt>Candidate</tt>s based on their priority and
|
* Compares the two <tt>Candidate</tt>s based on their priority and
|
||||||
@ -627,7 +627,7 @@ public class Component
|
|||||||
* <tt>Candidate</tt> has a lower, equal, or greater priority than the
|
* <tt>Candidate</tt> has a lower, equal, or greater priority than the
|
||||||
* second.
|
* second.
|
||||||
*/
|
*/
|
||||||
public int compare(Candidate c1, Candidate c2)
|
public int compare(Candidate<?> c1, Candidate<?> c2)
|
||||||
{
|
{
|
||||||
if(c1.getPriority() < c2.getPriority())
|
if(c1.getPriority() < c2.getPriority())
|
||||||
return 1;
|
return 1;
|
||||||
@ -740,7 +740,7 @@ public class Component
|
|||||||
* default for this <tt>Component</tt> or <tt>null</tt> if no such
|
* default for this <tt>Component</tt> or <tt>null</tt> if no such
|
||||||
* <tt>Candidate</tt> has reported yet.
|
* <tt>Candidate</tt> has reported yet.
|
||||||
*/
|
*/
|
||||||
public Candidate getDefaultRemoteCandidate()
|
public Candidate<?> getDefaultRemoteCandidate()
|
||||||
{
|
{
|
||||||
return defaultRemoteCandidate;
|
return defaultRemoteCandidate;
|
||||||
}
|
}
|
||||||
@ -753,7 +753,7 @@ public class Component
|
|||||||
* @param candidate the <tt>Candidate</tt> that the remote party has
|
* @param candidate the <tt>Candidate</tt> that the remote party has
|
||||||
* reported as default for this <tt>Component</tt>.
|
* reported as default for this <tt>Component</tt>.
|
||||||
*/
|
*/
|
||||||
public void setDefaultRemoteCandidate(Candidate candidate)
|
public void setDefaultRemoteCandidate(Candidate<?> candidate)
|
||||||
{
|
{
|
||||||
this.defaultRemoteCandidate = candidate;
|
this.defaultRemoteCandidate = candidate;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ public class FoundationsRegistry
|
|||||||
* @param candidate the <tt>Candidate</tt> that we'd like to assign a
|
* @param candidate the <tt>Candidate</tt> that we'd like to assign a
|
||||||
* foundation to.
|
* foundation to.
|
||||||
*/
|
*/
|
||||||
public void assignFoundation(Candidate candidate)
|
public void assignFoundation(Candidate<?> candidate)
|
||||||
{
|
{
|
||||||
//create the foundation key String
|
//create the foundation key String
|
||||||
CandidateType candidateType = candidate.getType();
|
CandidateType candidateType = candidate.getType();
|
||||||
|
|||||||
@ -7,10 +7,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.ice4j.ice.harvest;
|
package org.ice4j.ice.harvest;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import org.ice4j.ice.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages statisics about harvesting time.
|
* Manages statisics about harvesting time.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -231,10 +231,14 @@ public class StunCandidateHarvester
|
|||||||
component.getComponentID());
|
component.getComponentID());
|
||||||
stunStack = component.getParentStream().getParentAgent().getStunStack();
|
stunStack = component.getParentStream().getParentAgent().getStunStack();
|
||||||
|
|
||||||
for (Candidate cand : component.getLocalCandidates())
|
for (Candidate<?> cand : component.getLocalCandidates())
|
||||||
if (cand instanceof HostCandidate &&
|
{
|
||||||
cand.getTransport() == stunServer.getTransport())
|
if ((cand instanceof HostCandidate)
|
||||||
|
&& (cand.getTransport() == stunServer.getTransport()))
|
||||||
|
{
|
||||||
startResolvingCandidate((HostCandidate) cand);
|
startResolvingCandidate((HostCandidate) cand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
waitForResolutionEnd();
|
waitForResolutionEnd();
|
||||||
|
|
||||||
|
|||||||
@ -195,7 +195,7 @@ public class TurnCandidateHarvest
|
|||||||
*/
|
*/
|
||||||
boolean existsRelayedCandidate = false;
|
boolean existsRelayedCandidate = false;
|
||||||
|
|
||||||
for (Candidate aCandidate : getCandidates())
|
for (Candidate<?> aCandidate : getCandidates())
|
||||||
{
|
{
|
||||||
if (CandidateType.RELAYED_CANDIDATE.equals(
|
if (CandidateType.RELAYED_CANDIDATE.equals(
|
||||||
aCandidate.getType()))
|
aCandidate.getType()))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user