@@ -136,26 +136,26 @@ public void setReturnListener(ReturnListener listener) {
136136 returnListener = listener ;
137137 }
138138
139- /** Returns the current FlowListener. */
139+ /** Returns the current {@link FlowListener} . */
140140 public FlowListener getFlowListener () {
141141 return flowListener ;
142142 }
143143
144144 /**
145- * Sets the current FlowListener.
145+ * Sets the current {@link FlowListener} .
146146 * A null argument is interpreted to mean "do not use a flow listener".
147147 */
148148 public void setFlowListener (FlowListener listener ) {
149149 flowListener = listener ;
150150 }
151151
152- /** Returns the current ConfirmkListener . */
152+ /** Returns the current {@link ConfirmListener} . */
153153 public ConfirmListener getConfirmListener () {
154154 return confirmListener ;
155155 }
156156
157157 /**
158- * Sets the current ConfirmListener.
158+ * Sets the current {@link ConfirmListener} .
159159 * A null argument is interpreted to mean "do not use a confirm listener".
160160 */
161161 public void setConfirmListener (ConfirmListener listener ) {
@@ -341,18 +341,19 @@ public void releaseChannelNumber() {
341341 return false ;
342342 } else if (method instanceof Basic .Cancel ) {
343343 Basic .Cancel m = (Basic .Cancel )method ;
344- Consumer callback = _consumers .remove (m .consumerTag );
344+ String consumerTag = m .getConsumerTag ();
345+ Consumer callback = _consumers .remove (consumerTag );
345346 if (callback == null ) {
346347 callback = defaultConsumer ;
347348 }
348349 if (callback != null ) {
349350 try {
350- callback .handleCancel (m . getConsumerTag () );
351+ callback .handleCancel (consumerTag );
351352 } catch (Throwable ex ) {
352353 _connection .getExceptionHandler ().handleConsumerException (this ,
353354 ex ,
354355 callback ,
355- m . getConsumerTag () ,
356+ consumerTag ,
356357 "handleCancel" );
357358 }
358359 }
0 commit comments