Checkout
Branko ─îibej
committed
on 15 Jan
Fix issue #4801: Make JavaHL blame return byte[] file contents in the
blame callback instead of assuming they can be converted to String.

[… Show more
Fix issue #4801: Make JavaHL blame return byte[] file contents in the

blame callback instead of assuming they can be converted to String.

[in subversion/bindings/javahl/src/org/apache/subversion/javahl]

* ISVNClient.java

 (ISVNClient.blame): Add a new overload that uses the new BlameLineCallback.

  Deprecate the other two overloads that use BlameCallback.

* SVNClient.java

 (SVNClient.blame): Implement new native overload and deprecate the old ones.

 (SVNClient.BlameCallbackAdapter): New helper class.

* callback/BlameCallback.java

 (BlameCallback): Deprecated.

* callback/BlameLineCallback.java

 (BlameLineCallback): New, replaces BlameCallback.

[in subversion/bindings/javahl/tests/org/apache/subversion/javahl]

* BasicTests.java

 (testBasicBlame, testBlameWithDiffOptions): Suppress deprecation warnings

  as these tests use the old API, and should continue to do so in order to

  test the callback adapter.

 (testBinaryBlame): New test case.

 (collectBlameLines, BlameCallbackImpl): Suppress deprecation warnings.

 (BlameLineCallbackImpl): New helper class.

* ExceptionTests.java

 (testBlameCallback): Use the new API in this test case.

[in subversion/bindings/javahl/native]

* org_apache_subversion_javahl_SVNClient.cpp

 (Java_org_apache_subversion_javahl_SVNClient_blame): Update parameter order.

* BlameCallback.cpp

 (BlameCallback::singleLine): Use BlameLineCallback instead of BlameCallback.

Show less