Skip to content

Commit ad55687

Browse files
committed
Polishing
1 parent 32b9ea9 commit ad55687

File tree

7 files changed

+20
-10
lines changed

7 files changed

+20
-10
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 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.
@@ -41,6 +41,8 @@
4141
*/
4242
class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublisher {
4343

44+
// Various JMS 2.0 MessageProducer methods, if available
45+
4446
private static final Method setDeliveryDelayMethod =
4547
ClassUtils.getMethodIfAvailable(MessageProducer.class, "setDeliveryDelay", long.class);
4648

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 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.
@@ -78,9 +78,11 @@
7878
*/
7979
public class CachingConnectionFactory extends SingleConnectionFactory {
8080

81+
/** The JMS 2.0 Session.createSharedConsumer method, if available */
8182
private static final Method createSharedConsumerMethod = ClassUtils.getMethodIfAvailable(
8283
Session.class, "createSharedConsumer", Topic.class, String.class, String.class);
8384

85+
/** The JMS 2.0 Session.createSharedDurableConsumer method, if available */
8486
private static final Method createSharedDurableConsumerMethod = ClassUtils.getMethodIfAvailable(
8587
Session.class, "createSharedDurableConsumer", Topic.class, String.class, String.class);
8688

spring-jms/src/main/java/org/springframework/jms/core/JmsTemplate.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 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.
@@ -101,6 +101,7 @@ public class JmsTemplate extends JmsDestinationAccessor implements JmsOperations
101101
public static final long RECEIVE_TIMEOUT_INDEFINITE_WAIT = 0;
102102

103103

104+
/** The JMS 2.0 MessageProducer.setDeliveryDelay method, if available */
104105
private static final Method setDeliveryDelayMethod =
105106
ClassUtils.getMethodIfAvailable(MessageProducer.class, "setDeliveryDelay", long.class);
106107

spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,11 @@
134134
public abstract class AbstractMessageListenerContainer extends AbstractJmsListeningContainer
135135
implements MessageListenerContainer {
136136

137+
/** The JMS 2.0 Session.createSharedConsumer method, if available */
137138
private static final Method createSharedConsumerMethod = ClassUtils.getMethodIfAvailable(
138139
Session.class, "createSharedConsumer", Topic.class, String.class, String.class);
139140

141+
/** The JMS 2.0 Session.createSharedDurableConsumer method, if available */
140142
private static final Method createSharedDurableConsumerMethod = ClassUtils.getMethodIfAvailable(
141143
Session.class, "createSharedDurableConsumer", Topic.class, String.class, String.class);
142144

spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ public interface WebRequest extends RequestAttributes {
221221
* @return whether the request qualifies as not modified,
222222
* allowing to abort request processing and relying on the response
223223
* telling the client that the content has not been modified
224-
*
225224
* @since 4.2
226225
*/
227226
boolean checkNotModified(String etag, long lastModifiedTimestamp);

spring-web/src/main/java/org/springframework/web/context/request/async/NoSupportAsyncWebRequest.java

Lines changed: 3 additions & 1 deletion
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-2015 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.
@@ -33,6 +33,7 @@ public NoSupportAsyncWebRequest(HttpServletRequest request, HttpServletResponse
3333
super(request, response);
3434
}
3535

36+
3637
@Override
3738
public void addCompletionHandler(Runnable runnable) {
3839
// ignored
@@ -53,6 +54,7 @@ public boolean isAsyncStarted() {
5354
return false;
5455
}
5556

57+
5658
// Not supported
5759

5860
@Override

spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java

Lines changed: 7 additions & 5 deletions
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-2015 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.
@@ -35,7 +35,7 @@
3535
* <p>The servlet and all filters involved in an async request must have async
3636
* support enabled using the Servlet API or by adding an
3737
* {@code <async-support>true</async-support>} element to servlet and filter
38-
* declarations in web.xml
38+
* declarations in {@code web.xml}.
3939
*
4040
* @author Rossen Stoyanchev
4141
* @since 3.2
@@ -62,9 +62,9 @@ public StandardServletAsyncWebRequest(HttpServletRequest request, HttpServletRes
6262
super(request, response);
6363
}
6464

65+
6566
/**
66-
* {@inheritDoc}
67-
* <p>In Servlet 3 async processing, the timeout period begins after the
67+
* In Servlet 3 async processing, the timeout period begins after the
6868
* container processing thread has exited.
6969
*/
7070
@Override
@@ -85,7 +85,7 @@ public void addCompletionHandler(Runnable runnable) {
8585

8686
@Override
8787
public boolean isAsyncStarted() {
88-
return ((this.asyncContext != null) && getRequest().isAsyncStarted());
88+
return (this.asyncContext != null && getRequest().isAsyncStarted());
8989
}
9090

9191
/**
@@ -106,6 +106,7 @@ public void startAsync() {
106106
"or by adding \"<async-supported>true</async-supported>\" to servlet and " +
107107
"filter declarations in web.xml.");
108108
Assert.state(!isAsyncComplete(), "Async processing has already completed");
109+
109110
if (isAsyncStarted()) {
110111
return;
111112
}
@@ -122,6 +123,7 @@ public void dispatch() {
122123
this.asyncContext.dispatch();
123124
}
124125

126+
125127
// ---------------------------------------------------------------------
126128
// Implementation of AsyncListener methods
127129
// ---------------------------------------------------------------------

0 commit comments

Comments
 (0)