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

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

 



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@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]