[omniORB] Inconsistent enum return behavior

Peter Klotz Peter.Klotz at ith-icoserve.com
Thu Jun 23 17:30:18 BST 2016


Hello

Consider this IDL file shared by a client and a server:

enum Color { COL_WHITE };
typedef sequence<Color> Colors;
Color f();
Colors g();

Later someone alters the IDL file by adding an enum value:

enum Color { COL_WHITE, COL_BLACK };


The server uses the new IDL file and returns COL_BLACK when f() is called and a sequence with one element that is COL_BLACK when g() is called.

A client still using the old interface behaves inconsistent.

client calls f(): A MARSHAL exception with minor code MARSHAL_InvalidEnumValue is thrown by omniORB
client calls g(): Value 1 (which equals COL_BLACK) is received by the client. No exception is thrown. The interface inconsistency goes undetected.

Is this behavior correct?

Regards, Peter.



More information about the omniORB-list mailing list