From 465e6292ebdd5a69f55b889a4ac3fb75d61723df Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 28 Aug 2013 22:16:08 +0200 Subject: [PATCH] Javadoc fixes --- .../ClassPathBeanDefinitionScanner.java | 5 ++--- .../core/env/EnvironmentCapable.java | 15 +++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java b/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java index 42f5b0ab9ab..0c53a93b9ec 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java @@ -31,7 +31,6 @@ import org.springframework.core.env.Environment; import org.springframework.core.env.EnvironmentCapable; import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ResourceLoader; -import org.springframework.core.type.classreading.MetadataReader; import org.springframework.util.Assert; import org.springframework.util.PatternMatchUtils; @@ -318,8 +317,8 @@ public class ClassPathBeanDefinitionScanner extends ClassPathScanningCandidateCo /** * Determine whether the given new bean definition is compatible with * the given existing bean definition. - *

The default implementation simply considers them as compatible - * when the bean class name matches. + *

The default implementation considers them as compatible when the existing + * bean definition comes from the same source or from a non-scanning source. * @param newDefinition the new bean definition, originated from scanning * @param existingDefinition the existing bean definition, potentially an * explicitly defined one or a previously generated one from scanning diff --git a/spring-core/src/main/java/org/springframework/core/env/EnvironmentCapable.java b/spring-core/src/main/java/org/springframework/core/env/EnvironmentCapable.java index e95528fa353..7d6ca3875fc 100644 --- a/spring-core/src/main/java/org/springframework/core/env/EnvironmentCapable.java +++ b/spring-core/src/main/java/org/springframework/core/env/EnvironmentCapable.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,9 +16,8 @@ package org.springframework.core.env; - /** - * Interface indicating a component contains and makes available an {@link Environment} object. + * Interface indicating a component that contains and exposes an {@link Environment} reference. * *

All Spring application contexts are EnvironmentCapable, and the interface is used primarily * for performing {@code instanceof} checks in framework methods that accept BeanFactory @@ -29,20 +28,20 @@ package org.springframework.core.env; * extends EnvironmentCapable, and thus exposes a {@link #getEnvironment()} method; however, * {@link org.springframework.context.ConfigurableApplicationContext ConfigurableApplicationContext} * redefines {@link org.springframework.context.ConfigurableApplicationContext#getEnvironment - * getEnvironment()} and narrows the signature to return a {@link ConfigurableEnvironment}. The effect - * is that an Environment object is 'read-only' until it accessed from a ConfigurableApplicationContext, - * at which point it too may be configured. + * getEnvironment()} and narrows the signature to return a {@link ConfigurableEnvironment}. + * The effect is that an Environment object is 'read-only' until it is being accessed from + * a ConfigurableApplicationContext, at which point it too may be configured. * * @author Chris Beams * @since 3.1 * @see Environment * @see ConfigurableEnvironment - * @see org.springframework.context.ConfigurableApplicationContext#getEnvironment + * @see org.springframework.context.ConfigurableApplicationContext#getEnvironment() */ public interface EnvironmentCapable { /** - * Return the Environment for this object + * Return the {@link Environment} associated with this component. */ Environment getEnvironment();