You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mnemonic.apache.org by "Tao Jie (JIRA)" <ji...@apache.org> on 2018/01/31 07:43:00 UTC
[jira] [Created] (MNEMONIC-459) Missing import statement in
generated Durable class when it has fields of Durable Collection
Tao Jie created MNEMONIC-459:
--------------------------------
Summary: Missing import statement in generated Durable class when it has fields of Durable Collection
Key: MNEMONIC-459
URL: https://issues.apache.org/jira/browse/MNEMONIC-459
Project: Mnemonic
Issue Type: Bug
Reporter: Tao Jie
Assignee: Yanping Wang
When we define a type with DurableCollection fields (eg: DurableArray), the generated class has compilation error that missing import statement :{{import org.apache.mnemonic.collections.DurableArrayFactory;}}
In javapoet, import statement is created automatically once we add a type in statement. However in {{AnnotatedDurableEntityClass.buildGettersSpecs}}:
{code}
code.addStatement("$1N = $5N.restore($2N, $6L, $7L, phandler, $3N, $4N)", dynfieldinfo.name, allocname, autoreclaimname, reclaimctxname, String.format("%s%s", m_typeutils.asElement(methodinfo.elem.getReturnType()).getSimpleName(), cFACTORYNAMESUFFIX), dynfieldinfo.efproxiesname, dynfieldinfo.gftypesname);
{code}
{{$5N}} here is {{DurableArrayFactory}}, but it is treated as a variable rather than a type, as a result, it would not be added to the import statement.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)