@Override @SuppressWarnings("unchecked") public TypedValue read(EvaluationContext context, @Nullable Object target, String name) throws AccessException { if (target == null) { return TypedValue.NULL; } PropertyPath path = PropertyPath.from(name, type); try { return super.read(context, target, name); } catch (AccessException o_O) { Object emptyResult = path.isCollection() ? CollectionFactory.createCollection(List.class, 0) : CollectionFactory.createMap(Map.class, 0); ((Map<String, Object>) target).put(name, emptyResult); return new TypedValue(emptyResult, getDescriptor(path, emptyResult)); } finally { this.type = path.getType(); } }
.forPropertyAccessors(new PropertyTraversingMapAccessor(type, conversionService)) //