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

robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-jms.git


The following commit(s) were added to refs/heads/main by this push:
     new 010b519  QPIDJMS-560: Avoid unnecessary cast when throwing 
IllegalArgumentException
010b519 is described below

commit 010b5198415aa4b84ae49dcec23c39ac601cc9da
Author: Sebastian Thomschke <sebt...@users.noreply.github.com>
AuthorDate: Wed Feb 10 12:55:14 2021 +0100

    QPIDJMS-560: Avoid unnecessary cast when throwing IllegalArgumentException
    
    This closes #38
---
 .../src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java 
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
index c05da14..1b93f61 100644
--- 
a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
+++ 
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsConnectionFactory.java
@@ -361,8 +361,8 @@ public class JmsConnectionFactory extends JNDIStorable 
implements ConnectionFact
         if (name != null && name.trim().isEmpty() == false) {
             try {
                 return new URI(name);
-            } catch (URISyntaxException e) {
-                throw (IllegalArgumentException) new 
IllegalArgumentException("Invalid remote URI: " + name).initCause(e);
+            } catch (URISyntaxException ex) {
+                throw new IllegalArgumentException("Invalid remote URI: " + 
name, ex);
             }
         }
         return null;

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to