remove redundant code

pull/326/head
weihu 3 years ago
parent 360b0be13c
commit 61072e1344

@ -151,7 +151,7 @@ public class PolarisPropertySourceAutoRefresher
* java.lang.String, java.util.Set, org.springframework.beans.TypeConverter) * java.lang.String, java.util.Set, org.springframework.beans.TypeConverter)
*/ */
private Object resolvePropertyValue(SpringValue springValue) { private Object resolvePropertyValue(SpringValue springValue) {
// value will never be null, as @Value and @ApolloJsonValue will not allow that // value will never be null
Object value = placeholderHelper Object value = placeholderHelper
.resolvePropertyValue(beanFactory, springValue.getBeanName(), springValue.getPlaceholder()); .resolvePropertyValue(beanFactory, springValue.getBeanName(), springValue.getPlaceholder());

@ -35,13 +35,13 @@ public class SpringValue {
private MethodParameter methodParameter; private MethodParameter methodParameter;
private Field field; private Field field;
private WeakReference<Object> beanRef; private final WeakReference<Object> beanRef;
private String beanName; private final String beanName;
private String key; private final String key;
private String placeholder; private final String placeholder;
private Class<?> targetType; private final Class<?> targetType;
private Type genericType; private Type genericType;
private boolean isJson; private final boolean isJson;
public SpringValue(String key, String placeholder, Object bean, String beanName, Field field, boolean isJson) { public SpringValue(String key, String placeholder, Object bean, String beanName, Field field, boolean isJson) {
this.beanRef = new WeakReference<>(bean); this.beanRef = new WeakReference<>(bean);

Loading…
Cancel
Save