Skip to content

Commit 1899fb3

Browse files
committed
Polishing
1 parent a378912 commit 1899fb3

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

spring-core/src/main/java/org/springframework/core/io/support/EncodedResource.java

Lines changed: 4 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-2016 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.
@@ -52,7 +52,7 @@ public class EncodedResource implements InputStreamSource {
5252
/**
5353
* Create a new {@code EncodedResource} for the given {@code Resource},
5454
* not specifying an explicit encoding or {@code Charset}.
55-
* @param resource the {@code Resource} to hold; never {@code null}
55+
* @param resource the {@code Resource} to hold (never {@code null})
5656
*/
5757
public EncodedResource(Resource resource) {
5858
this(resource, null, null);
@@ -61,7 +61,7 @@ public EncodedResource(Resource resource) {
6161
/**
6262
* Create a new {@code EncodedResource} for the given {@code Resource},
6363
* using the specified {@code encoding}.
64-
* @param resource the {@code Resource} to hold; never {@code null}
64+
* @param resource the {@code Resource} to hold (never {@code null})
6565
* @param encoding the encoding to use for reading from the resource
6666
*/
6767
public EncodedResource(Resource resource, String encoding) {
@@ -71,7 +71,7 @@ public EncodedResource(Resource resource, String encoding) {
7171
/**
7272
* Create a new {@code EncodedResource} for the given {@code Resource},
7373
* using the specified {@code Charset}.
74-
* @param resource the {@code Resource} to hold; never {@code null}
74+
* @param resource the {@code Resource} to hold (never {@code null})
7575
* @param charset the {@code Charset} to use for reading from the resource
7676
*/
7777
public EncodedResource(Resource resource, Charset charset) {

spring-core/src/main/java/org/springframework/core/io/support/PropertiesLoaderUtils.java

Lines changed: 2 additions & 2 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-2016 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.
@@ -183,7 +183,7 @@ public static Properties loadAllProperties(String resourceName, ClassLoader clas
183183
ResourceUtils.useCachesIfNecessary(con);
184184
InputStream is = con.getInputStream();
185185
try {
186-
if (resourceName != null && resourceName.endsWith(XML_FILE_EXTENSION)) {
186+
if (resourceName.endsWith(XML_FILE_EXTENSION)) {
187187
props.loadFromXML(is);
188188
}
189189
else {

spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java

Lines changed: 1 addition & 9 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-2016 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.
@@ -51,7 +51,6 @@
5151

5252
/**
5353
* Alias for {@link #profiles}.
54-
*
5554
* <p>This attribute may <strong>not</strong> be used in conjunction with
5655
* {@link #profiles}, but it may be used <em>instead</em> of {@link #profiles}.
5756
*/
@@ -60,7 +59,6 @@
6059

6160
/**
6261
* The bean definition profiles to activate.
63-
*
6462
* <p>This attribute may <strong>not</strong> be used in conjunction with
6563
* {@link #value}, but it may be used <em>instead</em> of {@link #value}.
6664
*/
@@ -70,7 +68,6 @@
7068
/**
7169
* The type of {@link ActiveProfilesResolver} to use for resolving the active
7270
* bean definition profiles programmatically.
73-
*
7471
* @since 4.0
7572
* @see ActiveProfilesResolver
7673
*/
@@ -79,18 +76,15 @@
7976
/**
8077
* Whether or not bean definition profiles from superclasses should be
8178
* <em>inherited</em>.
82-
*
8379
* <p>The default value is {@code true}, which means that a test
8480
* class will <em>inherit</em> bean definition profiles defined by a
8581
* test superclass. Specifically, the bean definition profiles for a test
8682
* class will be appended to the list of bean definition profiles
8783
* defined by a test superclass. Thus, subclasses have the option of
8884
* <em>extending</em> the list of bean definition profiles.
89-
*
9085
* <p>If {@code inheritProfiles} is set to {@code false}, the bean
9186
* definition profiles for the test class will <em>shadow</em> and
9287
* effectively replace any bean definition profiles defined by a superclass.
93-
*
9488
* <p>In the following example, the {@code ApplicationContext} for
9589
* {@code BaseTest} will be loaded using only the &quot;base&quot;
9690
* bean definition profile; beans defined in the &quot;extended&quot; profile
@@ -110,11 +104,9 @@
110104
* // ...
111105
* }
112106
* </pre>
113-
*
114107
* <p>Note: {@code @ActiveProfiles} can be used when loading an
115108
* {@code ApplicationContext} from path-based resource locations or
116109
* annotated classes.
117-
*
118110
* @see ContextConfiguration#locations
119111
* @see ContextConfiguration#classes
120112
* @see ContextConfiguration#inheritLocations

0 commit comments

Comments
 (0)