File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
spring-jms/src/main/java/org/springframework/jms/support Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2022 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -192,7 +192,13 @@ protected JmsException convertJmsAccessException(JMSException ex) {
192
192
* @see jakarta.jms.ConnectionFactory#createConnection()
193
193
*/
194
194
protected Connection createConnection () throws JMSException {
195
- return obtainConnectionFactory ().createConnection ();
195
+ ConnectionFactory cf = obtainConnectionFactory ();
196
+ Connection con = cf .createConnection ();
197
+ if (con == null ) {
198
+ throw new jakarta .jms .IllegalStateException (
199
+ "ConnectionFactory returned null from createConnection(): " + cf );
200
+ }
201
+ return con ;
196
202
}
197
203
198
204
/**
You can’t perform that action at this time.
0 commit comments