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
8000
@@ -63,8 +63,9 @@ public synchronized T get() throws InterruptedException {
63
63
public synchronized T get (long timeout ) throws InterruptedException , TimeoutException {
64
64
if (timeout == INFINITY ) return get ();
65
65
66
- if (timeout < 0 )
66
+ if (timeout < 0 ) {
67
67
throw new AssertionError ("Timeout cannot be less than zero" );
68
+ }
68
69
69
70
long now = System .nanoTime () / NANOS_IN_MILLI ;
70
71
long maxTime = now + timeout ;
@@ -94,8 +95,9 @@ public synchronized T uninterruptibleGet() {
94
95
}
95
96
}
96
97
} finally {
97
- if (wasInterrupted )
98
+ if (wasInterrupted ) {
98
99
Thread .currentThread ().interrupt ();
100
+ }
99
101
}
100
102
}
101
103
@@ -122,8 +124,9 @@ public synchronized T uninterruptibleGet(int timeout) throws TimeoutException {
122
124
}
123
125
} while ((timeout == INFINITY ) || ((now = System .nanoTime () / NANOS_IN_MILLI ) < runTime ));
124
126
} finally {
125
- if (wasInterrupted )
127
+ if (wasInterrupted ) {
126
128
Thread .currentThread ().interrupt ();
129
+ }
127
130
}
128
131
129
132
throw new TimeoutException ();
Original file line number Diff line number Diff line change 31
31
* package-private.
32
32
*
33
33
* 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
35
38
* @see AMQChannel
36
39
*/
37
40
You can’t perform that action at this time.
0 commit comments