Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3770

JavaHL method to set binary property is broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.6.x
    • 1.7.0
    • bindings_javahl
    • None

    Description

      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.
      

      Attachments

        1. 1_icon.gif
          0.2 kB
          Subversion Importer
        2. 2_subversion.patch
          3 kB
          Subversion Importer

        Activity

          People

            Unassigned Unassigned
            markphip Mark Phippard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: