Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
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.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);
$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.
Attachments
Issue Links
- duplicates
-
MNEMONIC-452 Factory class not found
- Resolved