This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch activemq-5.18.x
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/activemq-5.18.x by this push:
new f01a3792c4 AMQ-9644: Don't allow create a queue when browsing (force
to create the queue first) in the webconsole
f01a3792c4 is described below
commit f01a3792c4dcb4c422d88b61e6a0f910e8a70adf
Author: JB Onofré <[email protected]>
AuthorDate: Tue Feb 25 13:51:59 2025 +0000
AMQ-9644: Don't allow create a queue when browsing (force to create the
queue first) in the webconsole
(cherry picked from commit bde4c08adb76dbd59a13c6d3a77f08c75dfe4684)
---
.../src/main/java/org/apache/activemq/web/QueueBrowseQuery.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git
a/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
b/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
index db93654b83..ae26f25c75 100644
--- a/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
+++ b/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
@@ -58,6 +58,13 @@ public class QueueBrowseQuery extends DestinationFacade
implements DisposableBea
public Queue getQueue() throws JMSException {
if (queue == null) {
+ try {
+ if (getBrokerFacade().getQueue(getValidDestination()) == null)
{
+ throw new IllegalArgumentException("Queue " +
getValidDestination() + " doesn't exist");
+ }
+ } catch (Exception e) {
+ throw new JMSException(e.getMessage());
+ }
queue = getSession().createQueue(getValidDestination());
}
return queue;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact