No - its a single instance of the Exception.  So there's no leak...
and the stack is not interesting...  and there's no thread safety
issue

The exception is used to flag a particular type of exception which
leads to an AMQP error
There's no need to have the stack trace retained.

It's just like having enumerated error codes returned.

It's *ugly* code, I'll grant you that :-)


-- Rob

On 18/05/07, Rupert Smith <[EMAIL PROTECTED]> wrote:
Just found this shocker:

private static final ExistingSubscriptionPreventsExclusive
EXISTING_SUBSCRIPTION =
        new ExistingSubscriptionPreventsExclusive();

Looks like a really bad idea as doesn't seem thread safe, as mutliple
threads raising these exceptions will overwrite each others stacks. I not
even sure that throw is thread safe in that respect? This could also cause
memory leaks, because objects refed by the static stack dump won't be
garbage collected.

Rupert

Reply via email to