Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: Linux
Platform: PC
-
762
Description
While invoking make-toast RPC, I specified an incorrect toasterToastType, ie "wheat-toast" instead of "wheat-bread":
{
"toaster:input" :
}
It got into the OpendaylightToaster.makeToast method fine although it threw an NPE because toastType was null. However since the toast type was invalid it should have been caught earlier and an exception thrown. The transformation from DOM input to MakeToastInput is done in a BindingCodec class that is generated on-the-fly from the MakeToastInput interface. The generated code actually calls LazyGeneratedCodecRegistry::IdentityCompositeCodec.deserialize which looks up the given "wheat-toast" qname in the qnamesToIdentityMap and just returns null if not found. It seems this method should throw an IllegalArgumentEx.