Skip to content

Commit 45c93e4

Browse files
committed
Polishing
1 parent 83a7deb commit 45c93e4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -55,7 +55,8 @@
5555
*
5656
* <p><b>NOTE: This ConnectionFactory decorator requires JMS 1.1 or higher.</b>
5757
* 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.
5960
*
6061
* <p>When using the JMS 1.0.2 API, this ConnectionFactory will switch
6162
* 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 {
242243
* @return the wrapped Session
243244
*/
244245
protected Session getCachedSessionProxy(Session target, LinkedList<Session> sessionList) {
245-
List<Class> classes = new ArrayList<Class>(3);
246+
List<Class<?>> classes = new ArrayList<Class<?>>(3);
246247
classes.add(SessionProxy.class);
247248
if (target instanceof QueueSession) {
248249
classes.add(QueueSession.class);
@@ -252,7 +253,7 @@ protected Session getCachedSessionProxy(Session target, LinkedList<Session> sess
252253
}
253254
return (Session) Proxy.newProxyInstance(
254255
SessionProxy.class.getClassLoader(),
255-
classes.toArray(new Class[classes.size()]),
256+
classes.toArray(new Class<?>[classes.size()]),
256257
new CachedSessionInvocationHandler(target, sessionList));
257258
}
258259

@@ -511,7 +512,7 @@ public ConsumerCacheKey(Destination destination, String selector, boolean noLoca
511512
}
512513

513514
public boolean equals(Object other) {
514-
if (other == this) {
515+
if (this == other) {
515516
return true;
516517
}
517518
ConsumerCacheKey otherKey = (ConsumerCacheKey) other;

0 commit comments

Comments
 (0)