What is the hash of a null-type attribute value?
Rod Widdowson
rdw at steadingsoftware.com
Thu Nov 7 14:14:57 EST 2019
But the point is that enum.toString() is not defined (AFAIK) and even if it is, it contains the full class name - just like the raw thing currently does. That leads to fragility at an API change...
By absolutely interpreting the value type in the same way we do for the other types we keep control of everything....
Sent from my iPad
> On 7 Nov 2019, at 18:37, Tom Zeller <tzeller at dragonacea.biz> wrote:
>
>
>>
>> On reflection, even if it could be demonstrated that what is written to an object stream is formally specified I'd want to make this
>> change since the existing code is fragile in the face of (API) changes in the future.
>
> If we want to write a String instead of an Enum to avoid Java API
> changes, how about
> objectOutputStream.writeObject(EmptyType.NULL_VALUE.toString());
> instead of
> objectOutputStream.writeObject("NULLVALUE");
> ?
>
> Or, just
> objectOutputStream.writeObject(value.getNativeValue().toString())
> should work too, I would think.
>
> Tom
> --
> To unsubscribe from this list send an email to dev-unsubscribe at shibboleth.net
More information about the dev
mailing list