Skip to content

Commit 743ce2c

Browse files
committed
Polishing
1 parent e19dff1 commit 743ce2c

File tree

13 files changed

+44
-28
lines changed

13 files changed

+44
-28
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ project("spring-beans-groovy") {
458458
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
459459
}
460460

461-
// this module's Java and Groovy sources need to be compiled together
461+
// This module's Java and Groovy sources need to be compiled together.
462462
compileJava.enabled = false
463463
sourceSets {
464464
main {

spring-core/src/main/java/org/springframework/util/StringUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 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.

spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/MySQLMaxValueIncrementer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*
3535
* <p>The sequence is kept in a table; there should be one sequence table per
3636
* table that needs an auto-generated key. The storage engine used by the sequence table
37-
* can be MYISAM or INNODB since the sequences are allocated using a separate connection
37+
* can be MYISAM or INNODB since the sequences are allocated using a separate connection
3838
* without being affected by any other transactions that might be in progress.
3939
*
4040
* <p>Example:
@@ -47,7 +47,7 @@
4747
* database. If the server or your application is stopped or crashes or a transaction
4848
* is rolled back, the unused values will never be served. The maximum hole size in
4949
* numbering is consequently the value of cacheSize.
50-
*
50+
*
5151
* <p>It is possible to avoid acquiring a new connection for the incrementer by setting the
5252
* "useNewConnection" property to false. In this case you <i>MUST</i> use a non-transactional
5353
* storage engine like MYISAM when defining the incrementer table.

spring-messaging/src/test/java/org/springframework/messaging/simp/user/TestSimpSession.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 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.
@@ -19,20 +19,23 @@
1919
import java.util.HashSet;
2020
import java.util.Set;
2121

22-
22+
/**
23+
* @author Rossen Stoyanchev
24+
*/
2325
public class TestSimpSession implements SimpSession {
2426

25-
private String id;
27+
private final String id;
2628

2729
private TestSimpUser user;
2830

29-
private Set<SimpSubscription> subscriptions = new HashSet<>();
31+
private final Set<SimpSubscription> subscriptions = new HashSet<>();
3032

3133

3234
public TestSimpSession(String id) {
3335
this.id = id;
3436
}
3537

38+
3639
@Override
3740
public String getId() {
3841
return id;
@@ -59,6 +62,7 @@ public void addSubscriptions(TestSimpSubscription... subscriptions) {
5962
}
6063
}
6164

65+
6266
@Override
6367
public boolean equals(Object other) {
6468
return (this == other || (other instanceof SimpSession && this.id.equals(((SimpSession) other).getId())));

spring-messaging/src/test/java/org/springframework/messaging/simp/user/TestSimpSubscription.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 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.
@@ -13,25 +13,29 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.messaging.simp.user;
1716

17+
package org.springframework.messaging.simp.user;
1818

1919
import org.springframework.util.ObjectUtils;
2020

21+
/**
22+
* @author Rossen Stoyanchev
23+
*/
2124
public class TestSimpSubscription implements SimpSubscription {
2225

23-
private String id;
26+
private final String destination;
2427

25-
private TestSimpSession session;
28+
private final String id;
2629

27-
private String destination;
30+
private TestSimpSession session;
2831

2932

3033
public TestSimpSubscription(String id, String destination) {
3134
this.destination = destination;
3235
this.id = id;
3336
}
3437

38+
3539
@Override
3640
public String getId() {
3741
return id;
@@ -51,6 +55,7 @@ public String getDestination() {
5155
return destination;
5256
}
5357

58+
5459
@Override
5560
public boolean equals(Object other) {
5661
if (this == other) {

spring-messaging/src/test/java/org/springframework/messaging/simp/user/TestSimpUser.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 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.
@@ -13,25 +13,29 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.messaging.simp.user;
1718

1819
import java.util.HashMap;
1920
import java.util.HashSet;
2021
import java.util.Map;
2122
import java.util.Set;
2223

23-
24+
/**
25+
* @author Rossen Stoyanchev
26+
*/
2427
public class TestSimpUser implements SimpUser {
2528

26-
private String name;
29+
private final String name;
2730

28-
private Map<String, SimpSession> sessions = new HashMap<>();
31+
private final Map<String, SimpSession> sessions = new HashMap<>();
2932

3033

3134
public TestSimpUser(String name) {
3235
this.name = name;
3336
}
3437

38+
3539
@Override
3640
public String getName() {
3741
return name;
@@ -59,6 +63,7 @@ public void addSessions(TestSimpSession... sessions) {
5963
}
6064
}
6165

66+
6267
@Override
6368
public boolean equals(Object other) {
6469
return (this == other || (other instanceof SimpUser && this.name.equals(((SimpUser) other).getName())));

spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,10 @@ public void addParameters(Map<String, ?> params) {
541541
for (String key : params.keySet()) {
542542
Object value = params.get(key);
543543
if (value instanceof String) {
544-
this.addParameter(key, (String) value);
544+
addParameter(key, (String) value);
545545
}
546546
else if (value instanceof String[]) {
547-
this.addParameter(key, (String[]) value);
547+
addParameter(key, (String[]) value);
548548
}
549549
else {
550550
throw new IllegalArgumentException("Parameter map value must be single value " +

spring-web/src/main/java/org/springframework/http/MediaType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 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.

spring-web/src/main/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverter.java

Lines changed: 1 addition & 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-2017 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.

spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,10 @@ public void addParameters(Map<String, ?> params) {
541541
for (String key : params.keySet()) {
542542
Object value = params.get(key);
543543
if (value instanceof String) {
544-
this.addParameter(key, (String) value);
544+
addParameter(key, (String) value);
545545
}
546546
else if (value instanceof String[]) {
547-
this.addParameter(key, (String[]) value);
547+
addParameter(key, (String[]) value);
548548
}
549549
else {
550550
throw new IllegalArgumentException("Parameter map value must be single value " +

spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletResponse.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 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.
@@ -215,6 +215,7 @@ public int getContentLength() {
215215
return (int) this.contentLength;
216216
}
217217

218+
@Override
218219
public void setContentLengthLong(long contentLength) {
219220
this.contentLength = contentLength;
220221
doAddHeaderValue(CONTENT_LENGTH_HEADER, contentLength, true);

spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 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.

spring-webmvc/src/main/java/org/springframework/web/servlet/view/feed/AbstractRssFeedView.java

Lines changed: 4 additions & 3 deletions
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-2017 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.
@@ -24,7 +24,7 @@
2424
import com.rometools.rome.feed.rss.Channel;
2525
import com.rometools.rome.feed.rss.Item;
2626

27-
import org.springframework.util.MimeTypeUtils;
27+
import org.springframework.http.MediaType;
2828

2929
/**
3030
* Abstract superclass for RSS Feed views, using the
@@ -48,9 +48,10 @@
4848
public abstract class AbstractRssFeedView extends AbstractFeedView<Channel> {
4949

5050
public AbstractRssFeedView() {
51-
setContentType(MimeTypeUtils.APPLICATION_RSS_XML_VALUE);
51+
setContentType(MediaType.APPLICATION_RSS_XML_VALUE);
5252
}
5353

54+
5455
/**
5556
* Create a new Channel instance to hold the entries.
5657
* <p>By default returns an RSS 2.0 channel, but the subclass can specify any channel.

0 commit comments

Comments
 (0)