Skip to content

Commit be1d00d

Browse files
authored
Merge pull request #1028 from HubSpot/add-protected-get-read-method
Add protected getReadMethod
2 parents 3ccf80e + 0910532 commit be1d00d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/com/hubspot/jinjava/el/ext/BeanELResolver.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public Object getValue(ELContext context, Object base, Object property) {
337337
}
338338
Object result = null;
339339
if (isResolvable(base)) {
340-
Method method = toBeanProperty(base, property).getReadMethod();
340+
Method method = getReadMethod(base, property);
341341
if (method == null) {
342342
throw new PropertyNotFoundException("Cannot read property " + property);
343343
}
@@ -649,6 +649,10 @@ protected Object[] coerceParams(
649649
return args;
650650
}
651651

652+
protected Method getReadMethod(Object base, Object property) {
653+
return toBeanProperty(base, property).getReadMethod();
654+
}
655+
652656
private void coerceValue(
653657
Object array,
654658
int index,

0 commit comments

Comments
 (0)