Source:
<code>private PropertyAdapter createPropertyAdapter(final Method mutator, final Method accessor, final String name, final TypeToken<Object> propertyType) { final Annotation[] propertyAnnotations; if (mutator == null) { propertyAnnotations = accessor.getAnnotations(); } else { propertyAnnotations = ObjectArrays.concat(mutator.getAnnotations(), accessor.getAnnotations(), Annotation.class); } final BeanProperty property = new BeanProperty(name, accessor.getDeclaringClass(), propertyAnnotations, propertyType); final boolean handleName; final TypeAdapter<Object> delegateAdapter; @SuppressWarnings("unchecked") BeanAdapter<Object> beanAdapter = (BeanAdapter<Object>) beanAdapters.get(property .getTypeToken().getType()); <START> if (null == beanAdapter) { <END> TypeToken propertyTypeToken = property.getTypeToken(); for (Type knownType : beanAdapters.keySet()) { if (TypeToken.of(knownType).isAssignableFrom(propertyTypeToken)) { beanAdapter = beanAdapters.get(knownType); beanAdapters.put(propertyTypeToken.getType(), beanAdapter); break ; } } } if (null == beanAdapter) { handleName = true; delegateAdapter = create(propertyType); } else { handleName = false; delegateAdapter = new NullSafeTypeAdapter<Object>( new DecoratedBeanAdapter<Object>(property, beanAdapter)); } if (null != delegateAdapter) { return new PropertyAdapter(property, accessor, mutator, delegateAdapter, handleName); } else { throw new KasperQueryAdapterException("Complex Queries are not supported! " + "Please flatten your Pojo in order to contain only java literal " + "properties or register custom a TypeAdapter."); } }</code><technical_language>glance fine me. A remark: instead of allowing this behaviour beanadapter type, factory level, fine that</technical_language>

Target:
private PropertyAdapter createPropertyAdapter(final Method mutator, final Method accessor, final String name, final TypeToken<Object> propertyType) { final Annotation[] propertyAnnotations; if (mutator == null) { propertyAnnotations = accessor.getAnnotations(); } else { propertyAnnotations = ObjectArrays.concat(mutator.getAnnotations(), accessor.getAnnotations(), Annotation.class); } final BeanProperty property = new BeanProperty(name, accessor.getDeclaringClass(), propertyAnnotations, propertyType); final boolean handleName; final TypeAdapter<Object> delegateAdapter; @SuppressWarnings("unchecked") BeanAdapter<Object> beanAdapter = (BeanAdapter<Object>) beanAdapters.get( property.getTypeToken().getType() ); if (null == beanAdapter) { final TypeToken propertyTypeToken = property.getTypeToken(); for (final Type knownType : beanAdapters.keySet()) { if (TypeToken.of(knownType).isAssignableFrom(propertyTypeToken)) { beanAdapter = beanAdapters.get(knownType); beanAdapters.put(propertyTypeToken.getType(), beanAdapter); break; } } } if (null == beanAdapter) { handleName = true; delegateAdapter = create(propertyType); } else { handleName = false; delegateAdapter = new NullSafeTypeAdapter<Object>( new DecoratedBeanAdapter<Object>(property, beanAdapter)); } if (null != delegateAdapter) { return new PropertyAdapter(property, accessor, mutator, delegateAdapter, handleName); } else { throw new KasperQueryAdapterException("Complex Queries are not supported! " + "Please flatten your Pojo in order to contain only java literal " + "properties or register custom a TypeAdapter."); } }