Polishing

This commit is contained in:
Juergen Hoeller 2016-02-22 23:26:41 +01:00
parent a3789120c9
commit 1899fb37c1
3 changed files with 7 additions and 15 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2015 the original author or authors. * Copyright 2002-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -52,7 +52,7 @@ public class EncodedResource implements InputStreamSource {
/** /**
* Create a new {@code EncodedResource} for the given {@code Resource}, * Create a new {@code EncodedResource} for the given {@code Resource},
* not specifying an explicit encoding or {@code Charset}. * not specifying an explicit encoding or {@code Charset}.
* @param resource the {@code Resource} to hold; never {@code null} * @param resource the {@code Resource} to hold (never {@code null})
*/ */
public EncodedResource(Resource resource) { public EncodedResource(Resource resource) {
this(resource, null, null); this(resource, null, null);
@ -61,7 +61,7 @@ public class EncodedResource implements InputStreamSource {
/** /**
* Create a new {@code EncodedResource} for the given {@code Resource}, * Create a new {@code EncodedResource} for the given {@code Resource},
* using the specified {@code encoding}. * using the specified {@code encoding}.
* @param resource the {@code Resource} to hold; never {@code null} * @param resource the {@code Resource} to hold (never {@code null})
* @param encoding the encoding to use for reading from the resource * @param encoding the encoding to use for reading from the resource
*/ */
public EncodedResource(Resource resource, String encoding) { public EncodedResource(Resource resource, String encoding) {
@ -71,7 +71,7 @@ public class EncodedResource implements InputStreamSource {
/** /**
* Create a new {@code EncodedResource} for the given {@code Resource}, * Create a new {@code EncodedResource} for the given {@code Resource},
* using the specified {@code Charset}. * using the specified {@code Charset}.
* @param resource the {@code Resource} to hold; never {@code null} * @param resource the {@code Resource} to hold (never {@code null})
* @param charset the {@code Charset} to use for reading from the resource * @param charset the {@code Charset} to use for reading from the resource
*/ */
public EncodedResource(Resource resource, Charset charset) { public EncodedResource(Resource resource, Charset charset) {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2014 the original author or authors. * Copyright 2002-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -183,7 +183,7 @@ public abstract class PropertiesLoaderUtils {
ResourceUtils.useCachesIfNecessary(con); ResourceUtils.useCachesIfNecessary(con);
InputStream is = con.getInputStream(); InputStream is = con.getInputStream();
try { try {
if (resourceName != null && resourceName.endsWith(XML_FILE_EXTENSION)) { if (resourceName.endsWith(XML_FILE_EXTENSION)) {
props.loadFromXML(is); props.loadFromXML(is);
} }
else { else {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2015 the original author or authors. * Copyright 2002-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -51,7 +51,6 @@ public @interface ActiveProfiles {
/** /**
* Alias for {@link #profiles}. * Alias for {@link #profiles}.
*
* <p>This attribute may <strong>not</strong> be used in conjunction with * <p>This attribute may <strong>not</strong> be used in conjunction with
* {@link #profiles}, but it may be used <em>instead</em> of {@link #profiles}. * {@link #profiles}, but it may be used <em>instead</em> of {@link #profiles}.
*/ */
@ -60,7 +59,6 @@ public @interface ActiveProfiles {
/** /**
* The bean definition profiles to activate. * The bean definition profiles to activate.
*
* <p>This attribute may <strong>not</strong> be used in conjunction with * <p>This attribute may <strong>not</strong> be used in conjunction with
* {@link #value}, but it may be used <em>instead</em> of {@link #value}. * {@link #value}, but it may be used <em>instead</em> of {@link #value}.
*/ */
@ -70,7 +68,6 @@ public @interface ActiveProfiles {
/** /**
* The type of {@link ActiveProfilesResolver} to use for resolving the active * The type of {@link ActiveProfilesResolver} to use for resolving the active
* bean definition profiles programmatically. * bean definition profiles programmatically.
*
* @since 4.0 * @since 4.0
* @see ActiveProfilesResolver * @see ActiveProfilesResolver
*/ */
@ -79,18 +76,15 @@ public @interface ActiveProfiles {
/** /**
* Whether or not bean definition profiles from superclasses should be * Whether or not bean definition profiles from superclasses should be
* <em>inherited</em>. * <em>inherited</em>.
*
* <p>The default value is {@code true}, which means that a test * <p>The default value is {@code true}, which means that a test
* class will <em>inherit</em> bean definition profiles defined by a * class will <em>inherit</em> bean definition profiles defined by a
* test superclass. Specifically, the bean definition profiles for a test * test superclass. Specifically, the bean definition profiles for a test
* class will be appended to the list of bean definition profiles * class will be appended to the list of bean definition profiles
* defined by a test superclass. Thus, subclasses have the option of * defined by a test superclass. Thus, subclasses have the option of
* <em>extending</em> the list of bean definition profiles. * <em>extending</em> the list of bean definition profiles.
*
* <p>If {@code inheritProfiles} is set to {@code false}, the bean * <p>If {@code inheritProfiles} is set to {@code false}, the bean
* definition profiles for the test class will <em>shadow</em> and * definition profiles for the test class will <em>shadow</em> and
* effectively replace any bean definition profiles defined by a superclass. * effectively replace any bean definition profiles defined by a superclass.
*
* <p>In the following example, the {@code ApplicationContext} for * <p>In the following example, the {@code ApplicationContext} for
* {@code BaseTest} will be loaded using only the &quot;base&quot; * {@code BaseTest} will be loaded using only the &quot;base&quot;
* bean definition profile; beans defined in the &quot;extended&quot; profile * bean definition profile; beans defined in the &quot;extended&quot; profile
@ -110,11 +104,9 @@ public @interface ActiveProfiles {
* // ... * // ...
* } * }
* </pre> * </pre>
*
* <p>Note: {@code @ActiveProfiles} can be used when loading an * <p>Note: {@code @ActiveProfiles} can be used when loading an
* {@code ApplicationContext} from path-based resource locations or * {@code ApplicationContext} from path-based resource locations or
* annotated classes. * annotated classes.
*
* @see ContextConfiguration#locations * @see ContextConfiguration#locations
* @see ContextConfiguration#classes * @see ContextConfiguration#classes
* @see ContextConfiguration#inheritLocations * @see ContextConfiguration#inheritLocations