Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.8.2
-
None
-
None
-
macOS 10.13.3
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Python 2.7.10
-
java python rpc
Description
Using the following IDL:
@namespace("us.codemug") protocol BooleanTestProtocol { void booleanInUnion(union{boolean, int, string} myunion); }
and the following Java implementation:
package us.codemug; import java.util.Map; import org.apache.avro.AvroRemoteException; public class BooleanTestResponder implements BooleanTestProtocol { public Void booleanInUnion(Object myunion) throws AvroRemoteException { print(myunion); return null; } private void print(Object value) { System.out.println("Type: " + value.getClass().getName()); System.out.println("Value: " + value); } }
When performing the IPC from python with the input:
args = dict() args['myunion'] = True requestor.request('booleanInUnion', args)
Produces this output at the server side:
Type: java.lang.Integer
Value: 1
The booleans are being converted to integers