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.
@@ -193,7 +193,13 @@ protected JmsException convertJmsAccessException(JMSException ex) {
193
193
* @see javax.jms.ConnectionFactory#createConnection()
194
194
*/
195
195
protected Connection createConnection () throws JMSException {
196
- return obtainConnectionFactory ().createConnection ();
196
+ ConnectionFactory cf = obtainConnectionFactory ();
197
+ Connection con = cf .createConnection ();
198
+ if (con == null ) {
199
+ throw new javax .jms .IllegalStateException (
200
+ "ConnectionFactory returned null from createConnection(): " + cf );
201
+ }
202
+ return con ;
197
203
}
198
204
199
205
/**
You can’t perform that action at this time.
0 commit comments