Polishing
This commit is contained in:
parent
2f33e77ab4
commit
c64a322e19
|
@ -910,7 +910,7 @@ Java::
|
|||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
----
|
||||
// create a startup step and start recording
|
||||
StartupStep scanPackages = this.getApplicationStartup().start("spring.context.base-packages.scan");
|
||||
StartupStep scanPackages = getApplicationStartup().start("spring.context.base-packages.scan");
|
||||
// add tagging information to the current step
|
||||
scanPackages.tag("packages", () -> Arrays.toString(basePackages));
|
||||
// perform the actual phase we're instrumenting
|
||||
|
@ -924,7 +924,7 @@ Kotlin::
|
|||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
----
|
||||
// create a startup step and start recording
|
||||
val scanPackages = this.getApplicationStartup().start("spring.context.base-packages.scan")
|
||||
val scanPackages = getApplicationStartup().start("spring.context.base-packages.scan")
|
||||
// add tagging information to the current step
|
||||
scanPackages.tag("packages", () -> Arrays.toString(basePackages))
|
||||
// perform the actual phase we're instrumenting
|
||||
|
|
|
@ -370,8 +370,8 @@ class CglibAopProxy implements AopProxy, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
return (this == other || (other instanceof CglibAopProxy cglibAopProxy &&
|
||||
AopProxyUtils.equalsInProxy(this.advised, cglibAopProxy.advised)));
|
||||
return (this == other || (other instanceof CglibAopProxy that &&
|
||||
AopProxyUtils.equalsInProxy(this.advised, that.advised)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2023 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.
|
||||
|
@ -20,6 +20,7 @@ import java.io.IOException;
|
|||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
|
||||
import org.springframework.beans.factory.xml.BeanDefinitionDocumentReader;
|
||||
import org.springframework.beans.factory.xml.ResourceEntityResolver;
|
||||
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
@ -95,12 +96,13 @@ public abstract class AbstractXmlApplicationContext extends AbstractRefreshableC
|
|||
}
|
||||
|
||||
/**
|
||||
* Initialize the bean definition reader used for loading the bean
|
||||
* definitions of this context. Default implementation is empty.
|
||||
* Initialize the bean definition reader used for loading the bean definitions
|
||||
* of this context. The default implementation sets the validating flag.
|
||||
* <p>Can be overridden in subclasses, e.g. for turning off XML validation
|
||||
* or using a different XmlBeanDefinitionParser implementation.
|
||||
* or using a different {@link BeanDefinitionDocumentReader} implementation.
|
||||
* @param reader the bean definition reader used by this context
|
||||
* @see org.springframework.beans.factory.xml.XmlBeanDefinitionReader#setDocumentReaderClass
|
||||
* @see XmlBeanDefinitionReader#setValidating
|
||||
* @see XmlBeanDefinitionReader#setDocumentReaderClass
|
||||
*/
|
||||
protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
|
||||
reader.setValidating(this.validating);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2023 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.
|
||||
|
|
|
@ -28,7 +28,7 @@ import org.springframework.core.env.PropertySource;
|
|||
*
|
||||
* The {@link #setProperty} and {@link #withProperty} methods are exposed for
|
||||
* convenience, for example:
|
||||
* <pre>
|
||||
* <pre class="code">
|
||||
* {@code
|
||||
* PropertySource<?> source = new MockPropertySource().withProperty("foo", "bar");
|
||||
* }
|
||||
|
@ -77,7 +77,7 @@ public class MockPropertySource extends PropertiesPropertySource {
|
|||
|
||||
/**
|
||||
* Create a new {@code MockPropertySource} with the given name and backed by the given
|
||||
* {@link Properties} object
|
||||
* {@link Properties} object.
|
||||
* @param name the {@linkplain #getName() name} of the property source
|
||||
* @param properties the properties to use
|
||||
*/
|
||||
|
|
|
@ -559,11 +559,10 @@ public class CachingConnectionFactory extends SingleConnectionFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object obj) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
// Effectively checking object equality as well as toString equality.
|
||||
// On WebSphere MQ, Destination objects do not implement equals...
|
||||
return (this == obj || (obj instanceof DestinationCacheKey otherKey &&
|
||||
destinationEquals(otherKey)));
|
||||
return (this == other || (other instanceof DestinationCacheKey that && destinationEquals(that)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,8 +21,7 @@ import org.springframework.core.env.ConfigurableEnvironment;
|
|||
|
||||
/**
|
||||
* Simple {@link ConfigurableEnvironment} implementation exposing
|
||||
* {@link #setProperty(String, String)} and {@link #withProperty(String, String)}
|
||||
* methods for testing purposes.
|
||||
* {@link #setProperty} and {@link #withProperty} methods for testing purposes.
|
||||
*
|
||||
* @author Chris Beams
|
||||
* @author Sam Brannen
|
||||
|
@ -33,6 +32,7 @@ public class MockEnvironment extends AbstractEnvironment {
|
|||
|
||||
private final MockPropertySource propertySource = new MockPropertySource();
|
||||
|
||||
|
||||
/**
|
||||
* Create a new {@code MockEnvironment} with a single {@link MockPropertySource}.
|
||||
*/
|
||||
|
@ -40,6 +40,7 @@ public class MockEnvironment extends AbstractEnvironment {
|
|||
getPropertySources().addLast(this.propertySource);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set a property on the underlying {@link MockPropertySource} for this environment.
|
||||
*/
|
||||
|
|
|
@ -48,6 +48,7 @@ public class MockPropertySource extends PropertiesPropertySource {
|
|||
*/
|
||||
public static final String MOCK_PROPERTIES_PROPERTY_SOURCE_NAME = "mockProperties";
|
||||
|
||||
|
||||
/**
|
||||
* Create a new {@code MockPropertySource} named {@value #MOCK_PROPERTIES_PROPERTY_SOURCE_NAME}
|
||||
* that will maintain its own internal {@link Properties} instance.
|
||||
|
@ -84,6 +85,7 @@ public class MockPropertySource extends PropertiesPropertySource {
|
|||
super(name, properties);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the given property on the underlying {@link Properties} object.
|
||||
*/
|
||||
|
@ -97,7 +99,7 @@ public class MockPropertySource extends PropertiesPropertySource {
|
|||
* @return this {@link MockPropertySource} instance
|
||||
*/
|
||||
public MockPropertySource withProperty(String name, Object value) {
|
||||
this.setProperty(name, value);
|
||||
setProperty(name, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -599,13 +599,11 @@ public class PathPattern implements Comparable<PathPattern> {
|
|||
|
||||
private final PathMatchInfo pathMatchInfo;
|
||||
|
||||
|
||||
PathRemainingMatchInfo(PathContainer pathMatched, PathContainer pathRemaining) {
|
||||
this(pathMatched, pathRemaining, PathMatchInfo.EMPTY);
|
||||
}
|
||||
|
||||
PathRemainingMatchInfo(PathContainer pathMatched, PathContainer pathRemaining,
|
||||
PathMatchInfo pathMatchInfo) {
|
||||
PathRemainingMatchInfo(PathContainer pathMatched, PathContainer pathRemaining, PathMatchInfo pathMatchInfo) {
|
||||
this.pathRemaining = pathRemaining;
|
||||
this.pathMatched = pathMatched;
|
||||
this.pathMatchInfo = pathMatchInfo;
|
||||
|
|
Loading…
Reference in New Issue