From 2a162eb1408a627bcecd08bb9a3bb157d029bb13 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Mon, 8 Apr 2013 08:06:46 +0200 Subject: [PATCH] Rename method to better reflect usage --- .../channel/ChannelFlushPromiseNotifier.java | 20 +++++++++---------- .../netty/channel/DefaultChannelPromise.java | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/transport/src/main/java/io/netty/channel/ChannelFlushPromiseNotifier.java b/transport/src/main/java/io/netty/channel/ChannelFlushPromiseNotifier.java index c609c9f0c3..84ca4a5c52 100644 --- a/transport/src/main/java/io/netty/channel/ChannelFlushPromiseNotifier.java +++ b/transport/src/main/java/io/netty/channel/ChannelFlushPromiseNotifier.java @@ -119,9 +119,9 @@ public final class ChannelFlushPromiseNotifier { break; } if (tryNotify) { - cp.future().tryFailure(cause); + cp.promise().tryFailure(cause); } else { - cp.future().setFailure(cause); + cp.promise().setFailure(cause); } } return this; @@ -151,9 +151,9 @@ public final class ChannelFlushPromiseNotifier { break; } if (tryNotify) { - cp.future().tryFailure(cause2); + cp.promise().tryFailure(cause2); } else { - cp.future().setFailure(cause2); + cp.promise().setFailure(cause2); } } return this; @@ -185,15 +185,15 @@ public final class ChannelFlushPromiseNotifier { flushCheckpoints.remove(); if (cause == null) { if (tryNotify) { - cp.future().trySuccess(); + cp.promise().trySuccess(); } else { - cp.future().setSuccess(); + cp.promise().setSuccess(); } } else { if (tryNotify) { - cp.future().tryFailure(cause); + cp.promise().tryFailure(cause); } else { - cp.future().setFailure(cause); + cp.promise().setFailure(cause); } } } @@ -213,7 +213,7 @@ public final class ChannelFlushPromiseNotifier { interface FlushCheckpoint { long flushCheckpoint(); void flushCheckpoint(long checkpoint); - ChannelPromise future(); + ChannelPromise promise(); } private static class DefaultFlushCheckpoint implements FlushCheckpoint { @@ -236,7 +236,7 @@ public final class ChannelFlushPromiseNotifier { } @Override - public ChannelPromise future() { + public ChannelPromise promise() { return future; } } diff --git a/transport/src/main/java/io/netty/channel/DefaultChannelPromise.java b/transport/src/main/java/io/netty/channel/DefaultChannelPromise.java index f72f98f3ec..274ef87f4e 100644 --- a/transport/src/main/java/io/netty/channel/DefaultChannelPromise.java +++ b/transport/src/main/java/io/netty/channel/DefaultChannelPromise.java @@ -154,7 +154,7 @@ public class DefaultChannelPromise extends DefaultPromise implements Chann } @Override - public ChannelPromise future() { + public ChannelPromise promise() { return this; }