diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..be08529
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..6e9aaff
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ ice4j
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/src/org/ice4j/pseudotcp/PseudoTcpSocket.java b/src/org/ice4j/pseudotcp/PseudoTcpSocket.java
index 8ca9345..fa071f8 100755
--- a/src/org/ice4j/pseudotcp/PseudoTcpSocket.java
+++ b/src/org/ice4j/pseudotcp/PseudoTcpSocket.java
@@ -239,7 +239,6 @@ public class PseudoTcpSocket implements IPseudoTcpNotify
pseudoTcp.NotifyClock(System.currentTimeMillis());
receiveThread = new Thread(new Runnable()
{
- @Override
public void run()
{
ReceivePackets();
@@ -247,7 +246,6 @@ public class PseudoTcpSocket implements IPseudoTcpNotify
}, "PseudoTcpReceiveThread");
clockThread = new Thread(new Runnable()
{
- @Override
public void run()
{
RunClock();
@@ -298,7 +296,6 @@ public class PseudoTcpSocket implements IPseudoTcpNotify
*
* @param tcp
*/
- @Override
public void OnTcpOpen(PseudoTCPBase tcp)
{
logger.log(Level.FINE, "tcp opened");
@@ -316,7 +313,6 @@ public class PseudoTcpSocket implements IPseudoTcpNotify
*
* @param tcp
*/
- @Override
public void OnTcpReadable(PseudoTCPBase tcp)
{
//release all thread blocked at read_notify monitor
@@ -334,7 +330,6 @@ public class PseudoTcpSocket implements IPseudoTcpNotify
*
* @param tcp
*/
- @Override
public void OnTcpWriteable(PseudoTCPBase tcp)
{
@@ -355,7 +350,6 @@ public class PseudoTcpSocket implements IPseudoTcpNotify
* @param tcp
* @param e
*/
- @Override
public void OnTcpClosed(PseudoTCPBase tcp, IOException e)
{
if (e != null)
@@ -415,7 +409,6 @@ public class PseudoTcpSocket implements IPseudoTcpNotify
* @param len
* @return
*/
- @Override
public WriteResult TcpWritePacket(PseudoTCPBase tcp, byte[] buffer, int len)
{
if (logger.isLoggable(Level.FINEST))
diff --git a/src/org/ice4j/socket/DelegatingDatagramSocket.java b/src/org/ice4j/socket/DelegatingDatagramSocket.java
index 3e9d1b5..41e81f1 100644
--- a/src/org/ice4j/socket/DelegatingDatagramSocket.java
+++ b/src/org/ice4j/socket/DelegatingDatagramSocket.java
@@ -14,13 +14,11 @@ import java.net.*;
import java.nio.channels.*;
import java.util.logging.*;
-import org.ice4j.stack.*;
-
/**
* Implements a DatagramSocket which delegates its calls to a specific
* DatagramSocket.
*
- * @author Lubomir Marinov
+ * @author Lyubomir Marinov
*/
public class DelegatingDatagramSocket
extends DatagramSocket
diff --git a/src/org/ice4j/socket/DelegatingSocket.java b/src/org/ice4j/socket/DelegatingSocket.java
index 8756dfe..d8ac296 100644
--- a/src/org/ice4j/socket/DelegatingSocket.java
+++ b/src/org/ice4j/socket/DelegatingSocket.java
@@ -10,8 +10,6 @@ import java.io.*;
import java.nio.channels.*;
import java.net.*;
-import org.ice4j.stack.*;
-
/**
* Implements a Socket which delegates its calls to a specific
* Socket.
diff --git a/src/org/ice4j/socket/StunDatagramPacketFilter.java b/src/org/ice4j/socket/StunDatagramPacketFilter.java
index 8fb24ce..11812a6 100644
--- a/src/org/ice4j/socket/StunDatagramPacketFilter.java
+++ b/src/org/ice4j/socket/StunDatagramPacketFilter.java
@@ -18,7 +18,7 @@ import org.ice4j.message.*;
* "Session Traversal Utilities for NAT (STUN)" i.e. with method Binding or the
* reserved method 0x000 and 0x002/SharedSecret.
*
- * @author Lubomir Marinov
+ * @author Lyubomir Marinov
*/
public class StunDatagramPacketFilter
implements DatagramPacketFilter
@@ -132,27 +132,38 @@ public class StunDatagramPacketFilter
}
/**
- * Indicates whether some other DatagramPacketFilter is "equal to" this one.
+ * Indicates whether some other object is "equal to" this one.
*
* @param obj the reference object with which to compare.
- * @return true if this StunDatagramPacketFilter is
- * equal to the obj argument; false otherwise.
- *
- * @throws java.lang.NullPointerException if obj is null;
+ * @return true if this StunDatagramPacketFilter is equal
+ * to the obj argument; false, otherwise.
*/
@Override
public boolean equals(Object obj)
- throws NullPointerException
{
- if(obj == this)
+ if (null == obj)
+ return false;
+ else if (this == obj)
return true;
+ else
+ return getClass().equals(obj.getClass());
+ }
- if(obj.getClass().equals(getClass()))
- {
- return true;
- }
-
- return false;
+ /**
+ * Returns a hash code value for this object for the benefit of hashtables
+ * such as those provided by Hashtable.
+ *
+ * @return a hash code value for this object
+ */
+ @Override
+ public int hashCode()
+ {
+ /*
+ * Overrides the super implementation in order to maintain the general
+ * contract of the hashCode method which states that equal objects must
+ * have equal hash codes.
+ */
+ return getClass().hashCode();
}
/**