1
1
/*
2
- * Copyright 2002-2012 the original author or authors.
2
+ * Copyright 2002-2014 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.
55
55
*
56
56
* <p><b>NOTE: This ConnectionFactory decorator requires JMS 1.1 or higher.</b>
57
57
* You may use it through the JMS 1.0.2 API; however, the target JMS driver
58
- * needs to be compliant with JMS 1.1.
58
+ * needs to be compliant with JMS 1.1. Note that there is no JMS 2.0 support
59
+ * in this version yet; please upgrade to Spring Framework 4.x for JMS 2.0.
59
60
*
60
61
* <p>When using the JMS 1.0.2 API, this ConnectionFactory will switch
61
62
* into queue/topic mode according to the JMS API methods used at runtime:
@@ -242,7 +243,7 @@ protected Session getSession(Connection con, Integer mode) throws JMSException {
242
243
* @return the wrapped Session
243
244
*/
244
245
protected Session getCachedSessionProxy (Session target , LinkedList <Session > sessionList ) {
245
- List <Class > classes = new ArrayList <Class >(3 );
246
+ List <Class <?>> classes = new ArrayList <Class <?> >(3 );
246
247
classes .add (SessionProxy .class );
247
248
if (target instanceof QueueSession ) {
248
249
classes .add (QueueSession .class );
@@ -252,7 +253,7 @@ protected Session getCachedSessionProxy(Session target, LinkedList<Session> sess
252
253
}
253
254
return (Session ) Proxy .newProxyInstance (
254
255
SessionProxy .class .getClassLoader (),
255
- classes .toArray (new Class [classes .size ()]),
256
+ classes .toArray (new Class <?> [classes .size ()]),
256
257
new CachedSessionInvocationHandler (target , sessionList ));
257
258
}
258
259
@@ -511,7 +512,7 @@ public ConsumerCacheKey(Destination destination, String selector, boolean noLoca
511
512
}
512
513
513
514
public boolean equals (Object other ) {
514
- if (other == this ) {
515
+ if (this == other ) {
515
516
return true ;
516
517
}
517
518
ConsumerCacheKey otherKey = (ConsumerCacheKey ) other ;
0 commit comments