Skip to content

Commit 8fe2e33

Browse files
amcrndaschl
authored andcommitted
SPY-195: Defer String Concat in handleEmptySelects()
MemcachedConnection.handleEmptySelects() has a debug level log statement that doesn't correctly defer the concatentation of the argument until it has determined that the level is enabled. Change-Id: I3c8bb70cfaa9f47eb790f2eb150bacca2ce839b6 Reviewed-on: http://review.couchbase.org/76567 Reviewed-by: Michael Nitschinger <michael@nitschinger.at> Tested-by: Michael Nitschinger <michael@nitschinger.at>
1 parent e1979df commit 8fe2e33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/net/spy/memcached/MemcachedConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ private void handleOperationalTasks() throws IOException {
499499
* Helper method for {@link #handleIO()} to handle empty select calls.
500500
*/
501501
private void handleEmptySelects() {
502-
getLogger().debug("No selectors ready, interrupted: "
503-
+ Thread.interrupted());
502+
getLogger().debug("No selectors ready, interrupted: %b",
503+
Thread.interrupted());
504504

505505
if (++emptySelects > DOUBLE_CHECK_EMPTY) {
506506
for (SelectionKey sk : selector.keys()) {

0 commit comments

Comments
 (0)