diff --git a/router/java/src/net/i2p/router/transport/udp/PeerState.java b/router/java/src/net/i2p/router/transport/udp/PeerState.java index 4b03005d8eac6b76f55aa8c97d3be436ce12bca5..b387c4247420b124d8db7f970d49c0ce44a4e6f1 100644 --- a/router/java/src/net/i2p/router/transport/udp/PeerState.java +++ b/router/java/src/net/i2p/router/transport/udp/PeerState.java @@ -1712,16 +1712,8 @@ public class PeerState { if (should) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Allocate sending (OLD) to " + _remotePeer + ": " + state.getMessageId()); - /* - while (iter.hasNext()) { - OutboundMessageState later = (OutboundMessageState)iter.next(); - OutNetMessage msg = later.getMessage(); - if (msg != null) - msg.timestamp("not reached for allocation " + msgs.size() + " other peers"); - } - */ if (rv == null) - rv = new ArrayList<OutboundMessageState>(_outboundMessages.size()); + rv = new ArrayList<OutboundMessageState>((1 + _outboundMessages.size()) / 2); rv.add(state); if (rv.size() >= _outboundMessages.size() / 2) return rv; @@ -1740,7 +1732,7 @@ public class PeerState { return rv; } } - return null; + return rv; } // Peek at head of _outboundQueue and see if we can send it. // If so, pull it off, put it in _outbundMessages, test diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java index 370cbda7fe08b83c7bec1b194a99218b83696f78..378cabd644208aa91da224fb80520cf0b417c53c 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -347,7 +347,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority } /** - * @returns the instance of OutboundMessageFragments + * @return the instance of OutboundMessageFragments * @since 0.9.48 */ OutboundMessageFragments getOMF() {