Browse Source

Remove duplicate "property" in PropertyCacheKey.toString()

Closes gh-26237
5.0.x
Juergen Hoeller 4 years ago
parent
commit
ace0dc740a
  1. 15
      spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java

15
spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectivePropertyAccessor.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2019 the original author or authors. * Copyright 2002-2020 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -46,7 +46,7 @@ import org.springframework.util.StringUtils;
/** /**
* A powerful {@link PropertyAccessor} that uses reflection to access properties * A powerful {@link PropertyAccessor} that uses reflection to access properties
* for reading and possibly also for writing. * for reading and possibly also for writing on a target instance.
* *
* <p>A property can be referenced through a public getter method (when being read) * <p>A property can be referenced through a public getter method (when being read)
* or a public setter method (when being written), and also as a public field. * or a public setter method (when being written), and also as a public field.
@ -96,8 +96,8 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
} }
/** /**
* Create a new property accessor for reading and possibly writing. * Create a new property accessor for reading and possibly also writing.
* @param allowWrite whether to also allow for write operations * @param allowWrite whether to allow write operations on a target instance
* @since 4.3.15 * @since 4.3.15
* @see #canWrite * @see #canWrite
*/ */
@ -615,8 +615,8 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
@Override @Override
public String toString() { public String toString() {
return "CacheKey [clazz=" + this.clazz.getName() + ", property=" + this.property + ", " + return "PropertyCacheKey [clazz=" + this.clazz.getName() + ", property=" + this.property +
this.property + ", targetIsClass=" + this.targetIsClass + "]"; ", targetIsClass=" + this.targetIsClass + "]";
} }
@Override @Override
@ -640,6 +640,9 @@ public class ReflectivePropertyAccessor implements PropertyAccessor {
*/ */
public static class OptimalPropertyAccessor implements CompilablePropertyAccessor { public static class OptimalPropertyAccessor implements CompilablePropertyAccessor {
/**
* The member being accessed.
*/
public final Member member; public final Member member;
private final TypeDescriptor typeDescriptor; private final TypeDescriptor typeDescriptor;

Loading…
Cancel
Save