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