Listing of an AgentID
with a subclass of NamedParameter
causes a MissingPropertyException
#253
Labels
AgentID
with a subclass of NamedParameter
causes a MissingPropertyException
#253
When using subclasses of
org.arl.fjage.param.NamedParameter
which are exposed by an Agent, when listing theAgentID
in a Groovy shell (like the one provided by the ShellAgent), aMissingPropertyException
is thrown.For example,
org.arl.fjage.sentuator.ConfigParam
from fjage-sentuator is a subclass oforg.arl.fjage.param.NamedParameter
.https://github.com/org-arl/fjage-sentuator/blob/master/src/main/groovy/org/arl/fjage/sentuator/ConfigParam.groovy
When but when listing an
Agent
which exposes aConfigParam
, like say aSentuator
on a groovy shell, nothing gets printed on the shell and an Exception is logged.This is due to
AgentID.metaClass.getAllParameters
in GroovyExtensions using the.name
field on theNamedParameter
. This works for allNamedParameter
since the field exists (but is private) so Groovy allows access to it but sinceConfigParam
is defined in another Jar, it fails.The fix should be to use the
.name()
method instead.The text was updated successfully, but these errors were encountered: