Skip to content

Commit c24dcd4

Browse files
BroadleafCommerce/QA#1457 - Allow indexed Solr fields to exist anywhere in the class hierarchy of Product
1 parent f9519f5 commit c24dcd4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/search/service/solr/SolrHelperServiceImpl.java

+7
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,13 @@ protected Object getPropertyValueInternal(Object object, String[] components, in
763763
return null;
764764
}
765765

766+
boolean isPropertyReadable = PropertyUtils.isReadable(object, components[currentPosition]);
767+
if (!isPropertyReadable) {
768+
LOG.debug(String.format("Could not find %s on %s, assuming this exists elsewhere in the class hierarchy",
769+
components[currentPosition], object.getClass().getName()));
770+
return null;
771+
}
772+
766773
Object propertyObject = PropertyUtils.getProperty(object, components[currentPosition]);
767774

768775
if (propertyObject != null) {

0 commit comments

Comments
 (0)