- Removes a couple of unnecessary lines which duplicated the previous two lines.
- Fixes a NullPointerException and related warnings about inconsistent synchronization.
This commit is contained in:
parent
605332bbe1
commit
ef562bd688
@ -14,8 +14,8 @@ import org.ice4j.ice.*;
|
||||
* The Address class is used to define destinations to outgoing Stun Packets.
|
||||
*
|
||||
* @author Emil Ivov
|
||||
* @author Lubomir Marinov
|
||||
*/
|
||||
|
||||
public class TransportAddress
|
||||
extends InetSocketAddress
|
||||
{
|
||||
@ -168,6 +168,21 @@ public class TransportAddress
|
||||
return transport;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether this <tt>TransportAddress</tt> is value equal to a
|
||||
* specific <tt>TransportAddress</tt>.
|
||||
*
|
||||
* @param transportAddress the <tt>TransportAddress</tt> to test for value
|
||||
* equality with this <tt>TransportAddress</tt>
|
||||
* @return <tt>true</tt> if this <tt>TransportAddress</tt> is value equal to
|
||||
* the specified <tt>transportAddress</tt>; otherwise, <tt>false</tt>
|
||||
* @see #equalsTransportAddress(Object)
|
||||
*/
|
||||
public boolean equals(TransportAddress transportAddress)
|
||||
{
|
||||
return equalsTransportAddress(transportAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares this object against the specified object. The result is
|
||||
* <tt>true</tt> if and only if the argument is not <tt>null</tt> and it
|
||||
|
||||
@ -131,10 +131,6 @@ class Connector
|
||||
|
||||
localSock.receive(packet);
|
||||
|
||||
//get lost if we are no longer running.
|
||||
if(!isRunning)
|
||||
return;
|
||||
|
||||
//get lost if we are no longer running.
|
||||
if(!isRunning)
|
||||
return;
|
||||
@ -225,6 +221,7 @@ class Connector
|
||||
* Returns a String representation of the object.
|
||||
* @return a String representation of the object.
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "org.ice4j.stack.AccessPoint@"
|
||||
|
||||
@ -32,7 +32,7 @@ public class EventDispatcher
|
||||
* Hashtable for managing property change listeners registered for specific
|
||||
* properties. Maps property names to PropertyChangeSupport objects.
|
||||
*/
|
||||
private Hashtable<TransportAddress, EventDispatcher>
|
||||
private final Hashtable<TransportAddress, EventDispatcher>
|
||||
requestListenersChildren
|
||||
= new Hashtable<TransportAddress, EventDispatcher>();
|
||||
|
||||
@ -176,7 +176,7 @@ public class EventDispatcher
|
||||
|
||||
synchronized(requestListenersChildren)
|
||||
{
|
||||
if (requestListenersChildren != null)
|
||||
if (!requestListenersChildren.isEmpty())
|
||||
{
|
||||
EventDispatcher child = requestListenersChildren.get(localAddr);
|
||||
if (child != null && child.requestListeners != null)
|
||||
@ -196,6 +196,6 @@ public class EventDispatcher
|
||||
{
|
||||
if(requestListeners != null)
|
||||
requestListeners.removeAllElements();
|
||||
requestListenersChildren = null;
|
||||
requestListenersChildren.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user