Skip to content

Commit 210e47d

Browse files
committed
Polishing
1 parent 0641183 commit 210e47d

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -47,7 +47,7 @@ public class NameMatchCacheOperationSource implements CacheOperationSource, Seri
4747

4848

4949
/** Keys are method names; values are TransactionAttributes. */
50-
private Map<String, Collection<CacheOperation>> nameMap = new LinkedHashMap<>();
50+
private final Map<String, Collection<CacheOperation>> nameMap = new LinkedHashMap<>();
5151

5252

5353
/**
@@ -117,8 +117,8 @@ public boolean equals(@Nullable Object other) {
117117
if (!(other instanceof NameMatchCacheOperationSource)) {
118118
return false;
119119
}
120-
NameMatchCacheOperationSource otherTas = (NameMatchCacheOperationSource) other;
121-
return ObjectUtils.nullSafeEquals(this.nameMap, otherTas.nameMap);
120+
NameMatchCacheOperationSource otherCos = (NameMatchCacheOperationSource) other;
121+
return ObjectUtils.nullSafeEquals(this.nameMap, otherCos.nameMap);
122122
}
123123

124124
@Override
@@ -130,4 +130,5 @@ public int hashCode() {
130130
public String toString() {
131131
return getClass().getName() + ": " + this.nameMap;
132132
}
133+
133134
}

spring-jms/src/main/java/org/springframework/jms/config/DefaultJmsListenerContainerFactory.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -27,8 +27,8 @@
2727
* A {@link JmsListenerContainerFactory} implementation to build a regular
2828
* {@link DefaultMessageListenerContainer}.
2929
*
30-
* <p>This should be the default for most users and a good transition paths
31-
* for those that are used to build such container definition manually.
30+
* <p>This should be the default for most users and a good transition path
31+
* for those who are used to building such a container definition manually.
3232
*
3333
* @author Stephane Nicoll
3434
* @since 4.1
@@ -67,63 +67,63 @@ public class DefaultJmsListenerContainerFactory
6767
/**
6868
* @see DefaultMessageListenerContainer#setTaskExecutor
6969
*/
70-
public void setTaskExecutor(Executor taskExecutor) {
70+
public void setTaskExecutor(@Nullable Executor taskExecutor) {
7171
this.taskExecutor = taskExecutor;
7272
}
7373

7474
/**
7575
* @see DefaultMessageListenerContainer#setTransactionManager
7676
*/
77-
public void setTransactionManager(PlatformTransactionManager transactionManager) {
77+
public void setTransactionManager(@Nullable PlatformTransactionManager transactionManager) {
7878
this.transactionManager = transactionManager;
7979
}
8080

8181
/**
8282
* @see DefaultMessageListenerContainer#setCacheLevel
8383
*/
84-
public void setCacheLevel(Integer cacheLevel) {
84+
public void setCacheLevel(@Nullable Integer cacheLevel) {
8585
this.cacheLevel = cacheLevel;
8686
}
8787

8888
/**
8989
* @see DefaultMessageListenerContainer#setCacheLevelName
9090
*/
91-
public void setCacheLevelName(String cacheLevelName) {
91+
public void setCacheLevelName(@Nullable String cacheLevelName) {
9292
this.cacheLevelName = cacheLevelName;
9393
}
9494

9595
/**
9696
* @see DefaultMessageListenerContainer#setConcurrency
9797
*/
98-
public void setConcurrency(String concurrency) {
98+
public void setConcurrency(@Nullable String concurrency) {
9999
this.concurrency = concurrency;
100100
}
101101

102102
/**
103103
* @see DefaultMessageListenerContainer#setMaxMessagesPerTask
104104
*/
105-
public void setMaxMessagesPerTask(Integer maxMessagesPerTask) {
105+
public void setMaxMessagesPerTask(@Nullable Integer maxMessagesPerTask) {
106106
this.maxMessagesPerTask = maxMessagesPerTask;
107107
}
108108

109109
/**
110110
* @see DefaultMessageListenerContainer#setReceiveTimeout
111111
*/
112-
public void setReceiveTimeout(Long receiveTimeout) {
112+
public void setReceiveTimeout(@Nullable Long receiveTimeout) {
113113
this.receiveTimeout = receiveTimeout;
114114
}
115115

116116
/**
117117
* @see DefaultMessageListenerContainer#setRecoveryInterval
118118
*/
119-
public void setRecoveryInterval(Long recoveryInterval) {
119+
public void setRecoveryInterval(@Nullable Long recoveryInterval) {
120120
this.recoveryInterval = recoveryInterval;
121121
}
122122

123123
/**
124124
* @see DefaultMessageListenerContainer#setBackOff
125125
*/
126-
public void setBackOff(BackOff backOff) {
126+
public void setBackOff(@Nullable BackOff backOff) {
127127
this.backOff = backOff;
128128
}
129129

0 commit comments

Comments
 (0)