This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 27437e91ba ARTEMIS-4932 mitigate NPE in URISchema
27437e91ba is described below

commit 27437e91ba5401087f107e632d57ab53e915612b
Author: Justin Bertram <[email protected]>
AuthorDate: Mon Oct 27 09:45:54 2025 -0500

    ARTEMIS-4932 mitigate NPE in URISchema
---
 .../src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
index 3d4c413333..4a06c37c69 100644
--- 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
+++ 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/uri/URISchema.java
@@ -48,7 +48,7 @@ public abstract class URISchema<T, P> {
 
    protected String getHost(URI uri) {
       URI defaultFactory = getDefaultURI();
-      if (defaultFactory != null && uri.getHost() == null && 
defaultFactory.getScheme().equals(uri.getScheme())) {
+      if (defaultFactory != null && uri.getHost() == null && 
defaultFactory.getScheme() != null && 
defaultFactory.getScheme().equals(uri.getScheme())) {
          uri = defaultFactory;
       }
       return uri.getHost();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to