On Wed, Dec 29, 2010 at 4:43 PM,  <markp...@tigris.org> wrote:
> http://subversion.tigris.org/issues/show_bug.cgi?id=3770
>                 Issue #|3770
>                 Summary|JavaHL method to set binary property is broken
>               Component|subversion
>                 Version|1.6.x
>                Platform|Macintosh
>                     URL|
>              OS/Version|All
>                  Status|NEW
>       Status whiteboard|
>                Keywords|
>              Resolution|
>              Issue type|DEFECT
>                Priority|P2
>            Subcomponent|bindings_javahl
>             Assigned to|iss...@subversion
>             Reported by|markphip
>
>
>
>
>
>
> ------- Additional comments from markp...@tigris.org Wed Dec 29 13:43:28 
> -0800 2010 -------
> JavaHL has a method to set a property using a byte array.  This method 
> existed so that binary
> properties, such as an image thumbnail can be set on a file.  If you go back 
> to the source for SVN 1.2,
> this went direct to a native method.  Somewhere along the way (probably in 
> 1.5 release) as new method
> signatures were added and we sought to reuse those methods we broke this 
> function.  Look at the
> current SVN 1.6.x implementation:
>
>
>    /**
>     * @deprecated Use {...@link #propertySet(String, String, String, int,
>     *                                     String[], boolean, Map)} instead.
>     * @since 1.2
>     */
>    public void propertySet(String path, String name, byte[] value,
>                            boolean recurse, boolean force)
>            throws ClientException
>    {
>        propertySet(path, name, new String(value), recurse, force);
>    }
>
>
> The incoming byte[] is converted to a String and the common method for using 
> a String is used.  This
> causes binary values to be corrupted.  I think we need to add a native method 
> back to the JavaHL library
> which receives a pure byte array.

Mark,
Daniel pointed out on IRC that all the revpropTable arguments in the
JavaHL API are Map<String, String>.  Should they be adjusted to
Map<String, byte[]> ?

-Hyrum

Reply via email to