Archived
This forum has been archived. Please start a new discussion on GitHub.
Ice 3.5.0 java optional return values.
in Help Center
Given:
slice2java generates client-side code to support the optional return type:
But it generates server-side code that ignores the optional return type:
The AMD type (if enabled) also ignores the optional type:
module Demo { interface OptReturn { optional(1) string returnOptionalString(); }; };
slice2java generates client-side code to support the optional return type:
public interface OptReturnPrx extends Ice.ObjectPrx { public Ice.Optional<String> returnOptionalString(); }
But it generates server-side code that ignores the optional return type:
public interface _OptReturnOperations { String returnOptionalString(Ice.Current __current); } public abstract class _OptReturnDisp extends Ice.ObjectImpl implements OptReturn { public final String returnOptionalString() { return returnOptionalString(null); } }
The AMD type (if enabled) also ignores the optional type:
public interface AMD_OptReturn_returnOptionalString extends Ice.AMDCallback { void ice_response(String __ret); }
0
Comments
-
Thank you, I was missing the "java:optional" metadata tag.0