You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ha...@apache.org on 2022/03/27 10:27:59 UTC

[activemq-nms-api] branch main updated: AMQNET-745 fixed NRE for single file assembly

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 7ff919a  AMQNET-745 fixed NRE for single file assembly
     new 4001fb7  Merge pull request #27 from i7nfinity/feature/AMQNET-745
7ff919a is described below

commit 7ff919a336d6e2fa97755fade9c227c360ac58b2
Author: Yulia Fatkullina <i7...@gmail.com>
AuthorDate: Thu Dec 9 13:17:12 2021 +0300

    AMQNET-745 fixed NRE for single file assembly
---
 src/nms-api/NMSConnectionFactory.cs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/nms-api/NMSConnectionFactory.cs b/src/nms-api/NMSConnectionFactory.cs
index 9e14ed3..06cea7c 100644
--- a/src/nms-api/NMSConnectionFactory.cs
+++ b/src/nms-api/NMSConnectionFactory.cs
@@ -340,7 +340,11 @@ namespace Apache.NMS
                 Assembly executingAssembly = Assembly.GetExecutingAssembly();
                 try
                 {
-                    pathList.Add(Path.GetDirectoryName(executingAssembly.Location));
+                    var path = Path.GetDirectoryName(executingAssembly.Location);
+                    if (!string.IsNullOrEmpty(path))
+                    {
+                        pathList.Add(path);
+                    }
                 }
                 catch (Exception ex)
                 {