Skip to content

Commit e780e04

Browse files
committed
fix: only call methods with zero parameters
1 parent 4987bac commit e780e04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/com/floreysoft/jmte/DefaultModelAdaptor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ protected Object getPropertyValue(Object o, String propertyName) {
220220
for (Method method : declaredMethods) {
221221
if (Modifier.isPublic(method.getModifiers())
222222
&& (method.getName().equals("get" + suffix) || method
223-
.getName().equals("is" + suffix))) {
223+
.getName().equals("is" + suffix))
224+
&& method.getParameterTypes().length == 0) {
224225
value = method.invoke(o, (Object[]) null);
225226
valueSet = true;
226227
member = method;

0 commit comments

Comments
 (0)