Commit 4af67cf9 authored by David Smith's avatar David Smith Committed by david

Minor tweak suggested by gato a few days ago; use isEmpty() instead of .size() <= 0

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9092 b35dd754-fafc-0310-a699-88a17e54d16e
parent 2a142623
...@@ -310,7 +310,7 @@ public class HttpSession extends LocalClientSession { ...@@ -310,7 +310,7 @@ public class HttpSession extends LocalClientSession {
* @return the time in milliseconds since the epoch that this session was last active. * @return the time in milliseconds since the epoch that this session was last active.
*/ */
public synchronized long getLastActivity() { public synchronized long getLastActivity() {
if (connectionQueue.size() <= 0) { if (connectionQueue.isEmpty()) {
return lastActivity; return lastActivity;
} }
else { else {
...@@ -417,7 +417,7 @@ public class HttpSession extends LocalClientSession { ...@@ -417,7 +417,7 @@ public class HttpSession extends LocalClientSession {
protected void sendPendingPackets() { protected void sendPendingPackets() {
// access blocked only on send to prevent deadlocks // access blocked only on send to prevent deadlocks
synchronized (packetsToSend) { synchronized (packetsToSend) {
if (packetsToSend.size() <= 0) { if (packetsToSend.isEmpty()) {
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment