[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[JavaHL] Reported incompatibility

From: Vladimir Berezniker <vmpn_at_hitechman.com>
Date: Wed, 12 Jun 2013 08:42:32 -0400

Hi All,

I came across a bug in one of the Atlassian tools that suggests that there
was an API compatibility break in the JavaHL between versions 1.6 and 1.7.
 I am not sure when/if I get time to look more into it, therefore I am
sharing with the group meanwhile. The following comment is from the issue:

https://jira.atlassian.com/browse/FE-4679

Conor MacNeill [Atlassian]<https://jira.atlassian.com/secure/ViewProfile.jspa?name=cmacneill>
added
a comment - 04/Jun/13 8:26 PM

This is caused by an incompatible class change made to the ProlistCallback
interface by the Subversion project. In the Subversion 1.6 version of the
call back the interface is defined as:

public interface ProplistCallback
{
    /**
     * the method will be called for every line in a file.
     * @param path the path.
     * @param properties the properties on the path.
     */
    public void singlePath(String path, Map properties);
}

In Subversion 1.7, the org.apache.subversion package was introduced and the
interface definition changed to

public interface ProplistCallback
    extends org.apache.subversion.javahl.callback.ProplistCallback
{
}

This change is not backward compatible since the actual callback definition
from the super interface in the new package is typed

public void singlePath(String path, Map<String, byte[]> properties);

Older versions (1.6 and older) of the native javahl library making the call
back do not pass a map containing byte[] values but a map containing
Strings. When FishEye iterates the map, there is an implicit cast to
(byte[]) to re-introduce the type information from the map. Old native code
calls will generate a ClassCastException as they are passing Strings.

Regards,

Vladimir
Received on 2013-06-12 14:43:07 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.