Skip to content

Commit 3a3f70a

Browse files
--
1 parent cd3ffbf commit 3a3f70a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

logback-amqp-consumer/src/main/java/ch/qos/logback/amqp/AmqpConsumer.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,17 @@ private final boolean declare ()
113113
final String queue;
114114
final boolean unique;
115115
if ((this.queue == null) || this.queue.isEmpty ()) {
116-
if (this.queue1 != null)
117-
queue = this.queue1;
118-
else
119-
queue = "";
116+
queue = "";
120117
unique = true;
121118
} else {
122119
queue = this.queue;
123120
unique = false;
124121
}
125122
this.callbacks.handleLogEvent (Level.INFO, null, "amqp consumer declaring the queue `%s`", queue);
123+
this.queue1 = null;
126124
try {
127125
this.queue1 = channel.queueDeclare (queue, true, unique, unique, null).getQueue ();
128126
} catch (final Throwable exception) {
129-
this.queue1 = null;
130127
this.callbacks.handleException (
131128
exception, "amqp consumer encountered an error while declaring the queue `%s`; aborting!", queue);
132129
return (false);

0 commit comments

Comments
 (0)