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.
@@ -87,10 +87,10 @@ public abstract class AbstractNestablePropertyAccessor extends AbstractPropertyA
8787 }
8888 }
8989
90+
9091 private int autoGrowCollectionLimit = Integer .MAX_VALUE ;
9192
92- /** The wrapped object */
93- private Object object ;
93+ private Object wrappedObject ;
9494
9595 private String nestedPath = "" ;
9696
@@ -204,23 +204,23 @@ public void setWrappedInstance(Object object) {
204204 public void setWrappedInstance (Object object , String nestedPath , Object rootObject ) {
205205 Assert .notNull (object , "Target object must not be null" );
206206 if (object .getClass () == javaUtilOptionalClass ) {
207- this .object = OptionalUnwrapper .unwrap (object );
207+ this .wrappedObject = OptionalUnwrapper .unwrap (object );
208208 }
209209 else {
210- this .object = object ;
210+ this .wrappedObject = object ;
211211 }
212212 this .nestedPath = (nestedPath != null ? nestedPath : "" );
213- this .rootObject = (!"" .equals (this .nestedPath ) ? rootObject : this .object );
213+ this .rootObject = (!"" .equals (this .nestedPath ) ? rootObject : this .wrappedObject );
214214 this .nestedPropertyAccessors = null ;
215- this .typeConverterDelegate = new TypeConverterDelegate (this , this .object );
215+ this .typeConverterDelegate = new TypeConverterDelegate (this , this .wrappedObject );
216216 }
217217
218218 public final Object getWrappedInstance () {
219- return this .object ;
219+ return this .wrappedObject ;
220220 }
221221
222222 public final Class <?> getWrappedClass () {
223- return (this .object != null ? this .object .getClass () : null );
223+ return (this .wrappedObject != null ? this .wrappedObject .getClass () : null );
224224 }
225225
226226 /**
@@ -303,7 +303,7 @@ protected void setPropertyValue(PropertyTokenHolder tokens, PropertyValue pv) th
303303 catch (NotReadablePropertyException ex ) {
304304 throw new NotWritablePropertyException (getRootClass (), this .nestedPath + propertyName ,
305305 "Cannot access indexed value in property referenced " +
306- "in indexed property path '" + propertyName + "'" , ex );
306+ "in indexed property path '" + propertyName + "'" , ex );
307307 }
308308 // Set value for last key.
309309 String key = tokens .keys [tokens .keys .length - 1 ];
@@ -318,7 +318,7 @@ protected void setPropertyValue(PropertyTokenHolder tokens, PropertyValue pv) th
318318 else {
319319 throw new NullValueInNestedPathException (getRootClass (), this .nestedPath + propertyName ,
320320 "Cannot access indexed value in property referenced " +
321- "in indexed property path '" + propertyName + "': returned null" );
321+ "in indexed property path '" + propertyName + "': returned null" );
322322 }
323323 }
324324 if (propValue .getClass ().isArray ()) {
@@ -367,8 +367,8 @@ else if (propValue instanceof List) {
367367 catch (NullPointerException ex ) {
368368 throw new InvalidPropertyException (getRootClass (), this .nestedPath + propertyName ,
369369 "Cannot set element with index " + index + " in List of size " +
370- size + ", accessed using property path '" + propertyName +
371- "': List does not support filling up gaps with null elements" );
370+ size + ", accessed using property path '" + propertyName +
371+ "': List does not support filling up gaps with null elements" );
372372 }
373373 }
374374 list .add (convertedValue );
@@ -405,7 +405,7 @@ else if (propValue instanceof Map) {
405405 else {
406406 throw new InvalidPropertyException (getRootClass (), this .nestedPath + propertyName ,
407407 "Property referenced in indexed property path '" + propertyName +
408- "' is neither an array nor a List nor a Map; returned value was [" + propValue + "]" );
408+ "' is neither an array nor a List nor a Map; returned value was [" + propValue + "]" );
409409 }
410410 }
411411
@@ -451,7 +451,7 @@ else if (propValue instanceof Map) {
451451 }
452452 pv .getOriginalPropertyValue ().conversionNecessary = (valueToApply != originalValue );
453453 }
454- ph .setValue (object , valueToApply );
454+ ph .setValue (this . wrappedObject , valueToApply );
455455 }
456456 catch (TypeMismatchException ex ) {
457457 throw ex ;
@@ -953,10 +953,9 @@ private PropertyTokenHolder getPropertyNameTokens(String propertyName) {
953953 tokens .actualName = (actualName != null ? actualName : propertyName );
954954 tokens .canonicalName = tokens .actualName ;
955955 if (!keys .isEmpty ()) {
956- tokens .canonicalName +=
957- PROPERTY_KEY_PREFIX +
958- StringUtils .collectionToDelimitedString (keys , PROPERTY_KEY_SUFFIX + PROPERTY_KEY_PREFIX ) +
959- PROPERTY_KEY_SUFFIX ;
956+ tokens .canonicalName += PROPERTY_KEY_PREFIX +
957+ StringUtils .collectionToDelimitedString (keys , PROPERTY_KEY_SUFFIX + PROPERTY_KEY_PREFIX ) +
958+ PROPERTY_KEY_SUFFIX ;
960959 tokens .keys = StringUtils .toStringArray (keys );
961960 }
962961 return tokens ;
@@ -965,8 +964,8 @@ private PropertyTokenHolder getPropertyNameTokens(String propertyName) {
965964 @ Override
966965 public String toString () {
967966 StringBuilder sb = new StringBuilder (getClass ().getName ());
968- if (this .object != null ) {
969- sb .append (": wrapping object [" ).append (ObjectUtils .identityToString (this .object )).append ("]" );
967+ if (this .wrappedObject != null ) {
968+ sb .append (": wrapping object [" ).append (ObjectUtils .identityToString (this .wrappedObject )).append ("]" );
970969 }
971970 else {
972971 sb .append (": no wrapped object set" );
0 commit comments