0

我收到错误消息:

java.lang.IllegalArgumentException: Cannot handle method. It is not a valid getter or setter and does not have an implementation supplied. Signature: public abstract ...

在使用 ActiveObjectsJUnitRunner 运行的单元测试中。该项目是一个带有 Active Objects 的 Atlassian Jira 插件。

4

1 回答 1

0

问题是我的一些同事将 getter 写为:

import net.java.ao.0neToMany;

@OneToMany
Collection<NdaProtectedItem> getNdaProtectedItems();

虽然它应该是:

@OneToMany
NdaProtectedItem[] getNdaProtectedItems();

结果必须是一个普通数组,ActiveObjects 不支持集合 getter!

于 2020-09-18T14:35:45.230 回答