File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/main/java/com/rabbitmq/utility Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,9 @@ public synchronized T get() throws InterruptedException {
6363 public synchronized T get (long timeout ) throws InterruptedException , TimeoutException {
6464 if (timeout == INFINITY ) return get ();
6565
66- if (timeout < 0 )
66+ if (timeout < 0 ) {
6767 throw new AssertionError ("Timeout cannot be less than zero" );
68+ }
6869
6970 long now = System .nanoTime () / NANOS_IN_MILLI ;
7071 long maxTime = now + timeout ;
@@ -94,8 +95,9 @@ public synchronized T uninterruptibleGet() {
9495 }
9596 }
9697 } finally {
97- if (wasInterrupted )
98+ if (wasInterrupted ) {
9899 Thread .currentThread ().interrupt ();
100+ }
99101 }
100102 }
101103
@@ -122,8 +124,9 @@ public synchronized T uninterruptibleGet(int timeout) throws TimeoutException {
122124 }
123125 } while ((timeout == INFINITY ) || ((now = System .nanoTime () / NANOS_IN_MILLI ) < runTime ));
124126 } finally {
125- if (wasInterrupted )
127+ if (wasInterrupted ) {
126128 Thread .currentThread ().interrupt ();
129+ }
127130 }
128131
129132 throw new TimeoutException ();
Original file line number Diff line number Diff line change 3131 * package-private.
3232 *
3333 * We currently just use this to time the quiescing RPC in AMQChannel.
34- *
34+ *
35+ * Will be removed in next major release.
36+ *
37+ * @deprecated
3538 * @see AMQChannel
3639 */
3740
You can’t perform that action at this time.
0 commit comments