[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH libvirt-java 1/2] Return a byte[] array with secretGetValue



On Thu, Jul 05, 2012 at 02:58:44PM +0200, Wido den Hollander wrote:
> 
> 
> On 05-07-12 10:20, Daniel Veillard wrote:
> >On Tue, Jun 26, 2012 at 10:07:31AM +0200, Wido den Hollander wrote:
> >>We break the API with this, but Java does not support multiple method signatures with different return types.
> >>
> >>The old method returned a String, but since a secret can be binary data this type is not suited.
> >>
> >>Users who now that their secret is in fact a String, can use cast with:
> >>
> >>Secret secret = conn.secretLookupByUUIDString("uuuuuuuid");
> >>String value = new String(secret.getValue());
> >
> >   While it makes perfect sense to switch the jna layer to byte array as
> >otherwise we can't guarantee functional operation in all cases, I aslo
> >think we should not break compatibility, since Java doesn't allow
> >overload with different value type, it just mean we need a new method
> >name.
> 
> Yes, I get that. We don't want to break anything here.
> 
> >
> >   So I'm simply renaming your method name to "getByteValue" but keeping
> >getValue() implemented with the cast you suggest, that seems to work for
> >me
> 
> I tested it and verified it's working for me with cephx authentication keys.

  Good :-) thanks for the fast feedback !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]