File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
org.springframework.jms/src/main/java/org/springframework/jms/support Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -252,8 +252,13 @@ public static void rollbackIfNecessary(Session session) throws JMSException {
252
252
public static String buildExceptionMessage (JMSException ex ) {
253
253
String message = ex .getMessage ();
254
254
Exception linkedEx = ex .getLinkedException ();
255
- if (linkedEx != null && message .indexOf (linkedEx .getMessage ()) == -1 ) {
256
- message = message + "; nested exception is " + linkedEx ;
255
+ if (linkedEx != null ) {
256
+ if (message == null ) {
257
+ message = linkedEx .toString ();
258
+ }
259
+ else if (!message .contains (linkedEx .getMessage ())) {
260
+ message = message + "; nested exception is " + linkedEx ;
261
+ }
257
262
}
258
263
return message ;
259
264
}
You can’t perform that action at this time.
0 commit comments