You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Template class does not properly impement Writeable:
there is no constructor taking StreamInput
the writeTo() implementation does not handle the List<Version>
// TODO: fix writeable when implementing get workflow API@OverridepublicvoidwriteTo(StreamOutputoutput) throwsIOException {
output.writeString(name);
output.writeOptionalString(description);
output.writeString(useCase);
output.writeVersion(templateVersion);
// output.writeList((List<? extends Writeable>) compatibilityVersion);output.writeMapWithConsistentOrder(workflows);
if (user != null) {
output.writeBoolean(true); // user existsuser.writeTo(output);
} else {
output.writeBoolean(false); // user does not exist
}
}
This is a similar issue to the resource mapping in #358 where output.writeList() needs a type that is supported in writeGenericValue. See StreamOutput line 663. These do not include the Version class.
The Version class itself (if not in a collection) can be written (it just writes the integer ID).
What solution would you like?
Option 1: Just don't implement writeable. We currently pass the template in the Response as a JSON string, parsing it at the other end.
Option 2: Properly make the whole template writeable so we don't have to use the string workaround. This should have improved performance.
For the specific TODO:
Manually write the list:
output.writeVInt(compatibilityVersion.size());
for (Versionv : compatibilityVersion) {
output.writeVersion(v);
}
And implement the corresponding readers in the constructor.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
The
Template
class does not properly impementWriteable
:StreamInput
writeTo()
implementation does not handle theList<Version>
This is a similar issue to the resource mapping in #358 where
output.writeList()
needs a type that is supported inwriteGenericValue
. SeeStreamOutput
line 663. These do not include theVersion
class.The Version class itself (if not in a collection) can be written (it just writes the integer ID).
What solution would you like?
Option 1: Just don't implement writeable. We currently pass the template in the
Response
as a JSON string, parsing it at the other end.Option 2: Properly make the whole template writeable so we don't have to use the string workaround. This should have improved performance.
For the specific TODO:
Manually write the list:
And implement the corresponding readers in the constructor.
The text was updated successfully, but these errors were encountered: