The issue showed up when I was implementing put() on the server side.
I had written the method like this:
{code}
@Override
public Void put(ByteBuffer key, ByteBuffer value) throws AvroRemoteException {
kvstore.put(key, value);
}
{code}
and was getting compiler errors. I just added a "return null;" and it
fixed the problem. I guess that I had expected the compiler to
produce a method with a return type of 'void', rather than 'Void'.
Thanks,
George
On Fri, Jul 31, 2009 at 4:54 PM, Doug Cutting<[email protected]> wrote:
> George Porter wrote:
>>
>> The 'put' message gets compiled into the following signature in Java:
>>
>> {code}
>> Void put(ByteBuffer key, ByteBuffer value)
>> throws AvroRemoteException;
>> {code}
>>
>> Unfortunately, Void isn't an instantiatable type in Java. Any thoughts?
>
> When do you need to instantiate a Void? I'm not saying this isn't a
> problem, I'm just not yet sure where the problem is.
>
> Doug
>