Skip to content

Commit 465e629

Browse files
committed
Javadoc fixes
1 parent fe8dec9 commit 465e629

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.springframework.core.env.EnvironmentCapable;
3232
import org.springframework.core.env.StandardEnvironment;
3333
import org.springframework.core.io.ResourceLoader;
34-
import org.springframework.core.type.classreading.MetadataReader;
3534
import org.springframework.util.Assert;
3635
import org.springframework.util.PatternMatchUtils;
3736

@@ -318,8 +317,8 @@ protected boolean checkCandidate(String beanName, BeanDefinition beanDefinition)
318317
/**
319318
* Determine whether the given new bean definition is compatible with
320319
* the given existing bean definition.
321-
* <p>The default implementation simply considers them as compatible
322-
* when the bean class name matches.
320+
* <p>The default implementation considers them as compatible when the existing
321+
* bean definition comes from the same source or from a non-scanning source.
323322
* @param newDefinition the new bean definition, originated from scanning
324323
* @param existingDefinition the existing bean definition, potentially an
325324
* explicitly defined one or a previously generated one from scanning

spring-core/src/main/java/org/springframework/core/env/EnvironmentCapable.java

Lines changed: 7 additions & 8 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-2013 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.
@@ -16,9 +16,8 @@
1616

1717
package org.springframework.core.env;
1818

19-
2019
/**
21-
* Interface indicating a component contains and makes available an {@link Environment} object.
20+
* Interface indicating a component that contains and exposes an {@link Environment} reference.
2221
*
2322
* <p>All Spring application contexts are EnvironmentCapable, and the interface is used primarily
2423
* for performing {@code instanceof} checks in framework methods that accept BeanFactory
@@ -29,20 +28,20 @@
2928
* extends EnvironmentCapable, and thus exposes a {@link #getEnvironment()} method; however,
3029
* {@link org.springframework.context.ConfigurableApplicationContext ConfigurableApplicationContext}
3130
* redefines {@link org.springframework.context.ConfigurableApplicationContext#getEnvironment
32-
* getEnvironment()} and narrows the signature to return a {@link ConfigurableEnvironment}. The effect
33-
* is that an Environment object is 'read-only' until it accessed from a ConfigurableApplicationContext,
34-
* at which point it too may be configured.
31+
* getEnvironment()} and narrows the signature to return a {@link ConfigurableEnvironment}.
32+
* The effect is that an Environment object is 'read-only' until it is being accessed from
33+
* a ConfigurableApplicationContext, at which point it too may be configured.
3534
*
3635
* @author Chris Beams
3736
* @since 3.1
3837
* @see Environment
3938
* @see ConfigurableEnvironment
40-
* @see org.springframework.context.ConfigurableApplicationContext#getEnvironment
39+
* @see org.springframework.context.ConfigurableApplicationContext#getEnvironment()
4140
*/
4241
public interface EnvironmentCapable {
4342

4443
/**
45-
* Return the Environment for this object
44+
* Return the {@link Environment} associated with this component.
4645
*/
4746
Environment getEnvironment();
4847

0 commit comments

Comments
 (0)