Merge branch '6.0.x'
# Conflicts: # spring-jcl/src/main/java/org/apache/commons/logging/LogFactory.java
This commit is contained in:
commit
1a201cd180
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2022 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.
|
||||
|
@ -125,7 +125,8 @@ public final class BeanDefinitionBuilder {
|
|||
* @since 5.3.9
|
||||
*/
|
||||
public static <T> BeanDefinitionBuilder rootBeanDefinition(ResolvableType beanType, Supplier<T> instanceSupplier) {
|
||||
RootBeanDefinition beanDefinition = new RootBeanDefinition(beanType);
|
||||
RootBeanDefinition beanDefinition = new RootBeanDefinition();
|
||||
beanDefinition.setTargetType(beanType);
|
||||
beanDefinition.setInstanceSupplier(instanceSupplier);
|
||||
return new BeanDefinitionBuilder(beanDefinition);
|
||||
}
|
||||
|
|
|
@ -161,7 +161,9 @@ public class RootBeanDefinition extends AbstractBeanDefinition {
|
|||
* @param beanType the type of bean to instantiate
|
||||
* @since 6.0
|
||||
* @see #setTargetType(ResolvableType)
|
||||
* @deprecated as of 6.0.11, in favor of an extra {@link #setTargetType(ResolvableType)} call
|
||||
*/
|
||||
@Deprecated(since = "6.0.11")
|
||||
public RootBeanDefinition(@Nullable ResolvableType beanType) {
|
||||
setTargetType(beanType);
|
||||
}
|
||||
|
|
|
@ -170,8 +170,9 @@ class BeanDefinitionMethodGeneratorTests {
|
|||
|
||||
@Test
|
||||
void generateBeanDefinitionMethodWhenHasGenericsGeneratesMethod() {
|
||||
RegisteredBean registeredBean = registerBean(new RootBeanDefinition(
|
||||
ResolvableType.forClassWithGenerics(GenericBean.class, Integer.class)));
|
||||
RootBeanDefinition beanDefinition = new RootBeanDefinition();
|
||||
beanDefinition.setTargetType(ResolvableType.forClassWithGenerics(GenericBean.class, Integer.class));
|
||||
RegisteredBean registeredBean = registerBean(beanDefinition);
|
||||
BeanDefinitionMethodGenerator generator = new BeanDefinitionMethodGenerator(
|
||||
this.methodGeneratorFactory, registeredBean, null,
|
||||
Collections.emptyList());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2022 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.
|
||||
|
@ -172,8 +172,9 @@ class DefaultBeanRegistrationCodeFragmentsTests {
|
|||
}
|
||||
|
||||
private RegisteredBean registerTestBean(ResolvableType beanType) {
|
||||
this.beanFactory.registerBeanDefinition("testBean",
|
||||
new RootBeanDefinition(beanType));
|
||||
RootBeanDefinition beanDefinition = new RootBeanDefinition();
|
||||
beanDefinition.setTargetType(beanType);
|
||||
this.beanFactory.registerBeanDefinition("testBean", beanDefinition);
|
||||
return RegisteredBean.of(this.beanFactory, "testBean");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2019 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.
|
||||
|
@ -102,6 +102,7 @@ public abstract class LogFactory {
|
|||
return getLog(name);
|
||||
}
|
||||
|
||||
|
||||
// Just in case some code happens to call uncommon Commons Logging methods...
|
||||
|
||||
@Deprecated
|
||||
|
@ -129,4 +130,19 @@ public abstract class LogFactory {
|
|||
// do nothing
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void release(ClassLoader classLoader) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void releaseAll() {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static String objectId(Object o) {
|
||||
return (o == null ? "null" : o.getClass().getName() + "@" + System.identityHashCode(o));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -53,8 +53,9 @@ public class LogFactoryService extends LogFactory {
|
|||
}
|
||||
|
||||
|
||||
// Just in case some code happens to call uncommon Commons Logging methods...
|
||||
// Just in case some code happens to rely on Commons Logging attributes...
|
||||
|
||||
@Override
|
||||
public void setAttribute(String name, Object value) {
|
||||
if (value != null) {
|
||||
this.attributes.put(name, value);
|
||||
|
@ -64,19 +65,19 @@ public class LogFactoryService extends LogFactory {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAttribute(String name) {
|
||||
this.attributes.remove(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getAttribute(String name) {
|
||||
return this.attributes.get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAttributeNames() {
|
||||
return this.attributes.keySet().toArray(new String[0]);
|
||||
}
|
||||
|
||||
public void release() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ dependencies {
|
|||
optional("org.eclipse.jetty:jetty-servlet") {
|
||||
exclude group: "jakarta.servlet", module: "jakarta.servlet-api"
|
||||
}
|
||||
optional("org.eclipse.jetty.ee10:jetty-ee10-servlet:12.0.0.beta1") {
|
||||
optional("org.eclipse.jetty.ee10:jetty-ee10-servlet:12.0.0.beta2") {
|
||||
exclude group: "jakarta.servlet", module: "jakarta.servlet-api"
|
||||
exclude group: "org.eclipse.jetty", module: "jetty-ee"
|
||||
exclude group: "org.eclipse.jetty", module: "jetty-security"
|
||||
|
|
Loading…
Reference in New Issue