Skip to content

Commit b5db5d3

Browse files
committed
Broadly remove deprecated core classes and methods
Issue: SPR-14430
1 parent 0fc0ce7 commit b5db5d3

File tree

119 files changed

+145
-6086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+145
-6086
lines changed

spring-aspects/src/test/java/org/springframework/cache/config/SomeKeyGenerator.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 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,8 +16,7 @@
1616

1717
package org.springframework.cache.config;
1818

19-
import org.springframework.cache.interceptor.DefaultKeyGenerator;
19+
import org.springframework.cache.interceptor.SimpleKeyGenerator;
2020

21-
@SuppressWarnings("deprecation")
22-
public class SomeKeyGenerator extends DefaultKeyGenerator {
21+
public class SomeKeyGenerator extends SimpleKeyGenerator {
2322
}

spring-beans/src/main/java/org/springframework/beans/factory/UnsatisfiedDependencyException.java

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -93,42 +93,6 @@ public UnsatisfiedDependencyException(
9393
initCause(ex);
9494
}
9595

96-
/**
97-
* Create a new UnsatisfiedDependencyException.
98-
* @param resourceDescription description of the resource that the bean definition came from
99-
* @param beanName the name of the bean requested
100-
* @param ctorArgIndex the index of the constructor argument that couldn't be satisfied
101-
* @param ctorArgType the type of the constructor argument that couldn't be satisfied
102-
* @param msg the detail message
103-
* @deprecated in favor of {@link #UnsatisfiedDependencyException(String, String, InjectionPoint, String)}
104-
*/
105-
@Deprecated
106-
public UnsatisfiedDependencyException(
107-
String resourceDescription, String beanName, int ctorArgIndex, Class<?> ctorArgType, String msg) {
108-
109-
super(resourceDescription, beanName,
110-
"Unsatisfied dependency expressed through constructor argument with index " +
111-
ctorArgIndex + " of type [" + ClassUtils.getQualifiedName(ctorArgType) + "]" +
112-
(msg != null ? ": " + msg : ""));
113-
}
114-
115-
/**
116-
* Create a new UnsatisfiedDependencyException.
117-
* @param resourceDescription description of the resource that the bean definition came from
118-
* @param beanName the name of the bean requested
119-
* @param ctorArgIndex the index of the constructor argument that couldn't be satisfied
120-
* @param ctorArgType the type of the constructor argument that couldn't be satisfied
121-
* @param ex the bean creation exception that indicated the unsatisfied dependency
122-
* @deprecated in favor of {@link #UnsatisfiedDependencyException(String, String, InjectionPoint, BeansException)}
123-
*/
124-
@Deprecated
125-
public UnsatisfiedDependencyException(
126-
String resourceDescription, String beanName, int ctorArgIndex, Class<?> ctorArgType, BeansException ex) {
127-
128-
this(resourceDescription, beanName, ctorArgIndex, ctorArgType, (ex != null ? ex.getMessage() : ""));
129-
initCause(ex);
130-
}
131-
13296

13397
/**
13498
* Return the injection point (field or method/constructor parameter), if known.

spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -222,24 +222,6 @@ protected void processProperties(ConfigurableListableBeanFactory beanFactoryToPr
222222
doProcessProperties(beanFactoryToProcess, valueResolver);
223223
}
224224

225-
/**
226-
* Parse the given String value for placeholder resolution.
227-
* @param strVal the String value to parse
228-
* @param props the Properties to resolve placeholders against
229-
* @param visitedPlaceholders the placeholders that have already been visited
230-
* during the current resolution attempt (ignored in this version of the code)
231-
* @deprecated as of Spring 3.0, in favor of using {@link #resolvePlaceholder}
232-
* with {@link org.springframework.util.PropertyPlaceholderHelper}.
233-
* Only retained for compatibility with Spring 2.5 extensions.
234-
*/
235-
@Deprecated
236-
protected String parseStringValue(String strVal, Properties props, Set<?> visitedPlaceholders) {
237-
PropertyPlaceholderHelper helper = new PropertyPlaceholderHelper(
238-
placeholderPrefix, placeholderSuffix, valueSeparator, ignoreUnresolvablePlaceholders);
239-
PlaceholderResolver resolver = new PropertyPlaceholderConfigurerResolver(props);
240-
return helper.replacePlaceholders(strVal, resolver);
241-
}
242-
243225

244226
private class PlaceholderResolvingStringValueResolver implements StringValueResolver {
245227

spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionBuilder.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,6 @@ public BeanDefinitionBuilder setFactoryMethod(String factoryMethod) {
166166
return this;
167167
}
168168

169-
/**
170-
* Add an indexed constructor arg value. The current index is tracked internally
171-
* and all additions are at the present point.
172-
* @deprecated since Spring 2.5, in favor of {@link #addConstructorArgValue}.
173-
* This variant just remains around for Spring Security 2.x compatibility.
174-
*/
175-
@Deprecated
176-
public BeanDefinitionBuilder addConstructorArg(Object value) {
177-
return addConstructorArgValue(value);
178-
}
179-
180169
/**
181170
* Add an indexed constructor arg value. The current index is tracked internally
182171
* and all additions are at the present point.

spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,6 @@ public final XmlReaderContext getReaderContext() {
270270
return this.readerContext;
271271
}
272272

273-
/**
274-
* Get the {@link Environment} associated with this helper instance.
275-
* @deprecated in favor of {@link XmlReaderContext#getEnvironment()}
276-
*/
277-
@Deprecated
278-
public final Environment getEnvironment() {
279-
return this.readerContext.getEnvironment();
280-
}
281-
282273
/**
283274
* Invoke the {@link org.springframework.beans.factory.parsing.SourceExtractor} to pull the
284275
* source metadata from the supplied {@link Element}.

spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,6 @@ public void setBeanFactory(BeanFactory beanFactory) {
172172
this.beanFactory = beanFactory;
173173
}
174174

175-
/**
176-
* @deprecated as of 4.3, in favor of {@link #setBeanFactory}
177-
*/
178-
@Deprecated
179-
public void setApplicationContext(ApplicationContext applicationContext) {
180-
this.beanFactory = applicationContext;
181-
}
182-
183175

184176
@Override
185177
public void afterPropertiesSet() {

spring-context/src/main/java/org/springframework/cache/interceptor/DefaultKeyGenerator.java

Lines changed: 0 additions & 67 deletions
This file was deleted.

spring-context/src/main/java/org/springframework/cache/support/AbstractCacheManager.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 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.
@@ -128,21 +128,6 @@ protected final Cache lookupCache(String name) {
128128
return this.cacheMap.get(name);
129129
}
130130

131-
/**
132-
* Dynamically register an additional Cache with this manager.
133-
* @param cache the Cache to register
134-
* @deprecated as of Spring 4.3, in favor of {@link #getMissingCache(String)}
135-
*/
136-
@Deprecated
137-
protected final void addCache(Cache cache) {
138-
String name = cache.getName();
139-
synchronized (this.cacheMap) {
140-
if (this.cacheMap.put(name, decorateCache(cache)) == null) {
141-
updateCacheNames(name);
142-
}
143-
}
144-
}
145-
146131
/**
147132
* Update the exposed {@link #cacheNames} set with the given name.
148133
* <p>This will always be called within a full {@link #cacheMap} lock

spring-context/src/main/java/org/springframework/format/number/CurrencyFormatter.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

spring-context/src/main/java/org/springframework/format/number/NumberFormatter.java

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)