You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2022/01/14 14:01:51 UTC
svn commit: r1897034 [5/37] - in /subversion/branches/multi-wc-format: ./ build/ build/ac-macros/ build/generator/ build/generator/swig/ build/generator/templates/ contrib/client-side/ contrib/client-side/svn_load_dirs/ contrib/hook-scripts/ contrib/se...
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/JNIUtil.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/JNIUtil.cpp Fri Jan 14 14:01:45 2022
@@ -243,7 +243,7 @@ bool JNIUtil::JNIGlobalInit(JNIEnv *env)
#endif
#if defined(WIN32) || defined(__CYGWIN__)
- /* See http://svn.apache.org/repos/asf/subversion/trunk/notes/asp-dot-net-hack.txt */
+ /* See https://svn.apache.org/repos/asf/subversion/trunk/notes/asp-dot-net-hack.txt */
/* ### This code really only needs to be invoked by consumers of
### the libsvn_wc library, which basically means SVNClient. */
if (getenv("SVN_ASP_DOT_NET_HACK"))
@@ -551,6 +551,11 @@ std::string JNIUtil::makeSVNErrorMessage
jstring *jerror_message,
jobject *jmessage_stack)
{
+ // This function may be called with a pending Java exception.
+ // It is incorrect to call Java methods (see code below) with a pending
+ // exception. Stash it away until this function exits.
+ StashException stash(getEnv());
+
if (jerror_message)
*jerror_message = NULL;
if (jmessage_stack)
@@ -761,16 +766,27 @@ namespace {
const char* known_exception_to_cstring(apr_pool_t* pool)
{
JNIEnv *env = JNIUtil::getEnv();
+
+ // This function may be called with a pending Java exception.
+ // It is incorrect to call Java methods (see code below) with a pending
+ // exception. Stash it away until this function exits.
jthrowable t = env->ExceptionOccurred();
+ StashException stashed(env);
+
jclass cls = env->GetObjectClass(t);
jstring jclass_name;
{
jmethodID mid = env->GetMethodID(cls, "getClass", "()Ljava/lang/Class;");
jobject clsobj = env->CallObjectMethod(t, mid);
+ if (JNIUtil::isJavaExceptionThrown())
+ return NULL;
+
jclass basecls = env->GetObjectClass(clsobj);
mid = env->GetMethodID(basecls, "getName", "()Ljava/lang/String;");
jclass_name = (jstring) env->CallObjectMethod(clsobj, mid);
+ if (JNIUtil::isJavaExceptionThrown())
+ return NULL;
}
jstring jmessage;
@@ -778,6 +794,8 @@ const char* known_exception_to_cstring(a
jmethodID mid = env->GetMethodID(cls, "getMessage",
"()Ljava/lang/String;");
jmessage = (jstring) env->CallObjectMethod(t, mid);
+ if (JNIUtil::isJavaExceptionThrown())
+ return NULL;
}
JNIStringHolder class_name(jclass_name);
@@ -824,7 +842,7 @@ JNIUtil::checkJavaException(apr_status_t
else
err->message = _("Java exception");
-
+
/* ### TODO: Use apr_pool_userdata_set() on the pool we just created
for the error chain to keep track of the actual Java
exception while the error is inside Subversion.
@@ -1169,3 +1187,28 @@ jthrowable JNIUtil::unwrapJavaException(
return
WrappedException::get_exception(err->pool);
}
+
+StashException::StashException(JNIEnv* env)
+{
+ m_env = env;
+ m_stashed = NULL;
+ stashException();
+}
+
+StashException::~StashException()
+{
+ if (m_stashed)
+ m_env->Throw(m_stashed);
+}
+
+void StashException::stashException()
+{
+ jthrowable jexc = m_env->ExceptionOccurred();
+ if (!jexc)
+ return;
+
+ if (!m_stashed)
+ m_stashed = jexc;
+
+ m_env->ExceptionClear();
+}
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/JNIUtil.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/JNIUtil.h?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/JNIUtil.h (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/JNIUtil.h Fri Jan 14 14:01:45 2022
@@ -248,7 +248,7 @@ class JNIUtil
* A statement macro used for checking for errors, in the style of
* SVN_ERR().
*
- * Evalute @a expr. If it yields an error, handle the JNI error, and
+ * Evaluate @a expr. If it yields an error, handle the JNI error, and
* return @a ret_val. Otherwise, continue.
*
* Note that if the enclosing function returns <tt>void</tt>, @a ret_val may
@@ -330,4 +330,37 @@ class JNIUtil
} \
} while(0)
+/**
+ * If there's an exception pending, temporarily stash it away, then
+ * re-throw again in destructor. The goal is to allow some Java calls
+ * to be made despite a pending exception. For example, doing some
+ * necessary cleanup.
+ */
+class StashException
+{
+ public:
+ /*
+ * Works like stashException().
+ */
+ StashException(JNIEnv* env);
+
+ /**
+ * If there's an exception stashed, re-throws it.
+ */
+ ~StashException();
+
+ /**
+ * Check for a pending exception.
+ * If present, stash it away until this class's destructor.
+ * If another exception is already stashed, forget the _new_ one. The
+ * reason behind it is that usually the first exception is the most
+ * informative.
+ */
+ void stashException();
+
+ private:
+ JNIEnv* m_env;
+ jthrowable m_stashed;
+};
+
#endif // JNIUTIL_H
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/NativeStream.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/NativeStream.hpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/NativeStream.hpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/NativeStream.hpp Fri Jan 14 14:01:45 2022
@@ -43,7 +43,7 @@ class NativeInputStream : public ::SVNBa
{
public:
/**
- * Construcs the native instance that will be wrapped in a Java obejct.
+ * Constructs the native instance that will be wrapped in a Java object.
* If @a stream is @c NULL, you must call #set_stream before creating
* the Java wrapper.
*/
@@ -141,7 +141,7 @@ class NativeOutputStream : public ::SVNB
{
public:
/**
- * Construcs the native instance that will be wrapped in a Java obejct.
+ * Constructs the native instance that will be wrapped in a Java object.
* If @a stream is @c NULL, you must call #set_stream before creating
* the Java wrapper.
*/
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/OperationContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/OperationContext.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/OperationContext.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/OperationContext.cpp Fri Jan 14 14:01:45 2022
@@ -43,7 +43,7 @@
OperationContext::OperationContext(SVN::Pool &pool)
: m_config(NULL),
- m_prompter(NULL),
+ m_prompter(),
m_cancelOperation(0),
m_pool(&pool),
m_jctx(NULL),
@@ -189,7 +189,7 @@ OperationContext::getAuthBaton(SVN::Pool
}
else
{
- // Not using hte native credentials store, start with an empty
+ // Not using the native credentials store, start with an empty
// providers array.
providers = apr_array_make(pool, 0, sizeof(svn_auth_provider_object_t *));
}
@@ -253,7 +253,7 @@ OperationContext::password(const char *p
void
OperationContext::setPrompt(Prompter::UniquePtr prompter)
{
- m_prompter = prompter;
+ m_prompter = JavaHL::cxx::move(prompter);
}
void
@@ -311,7 +311,7 @@ Prompter::UniquePtr OperationContext::cl
{
if (m_prompter.get())
return m_prompter->clone();
- return Prompter::UniquePtr(NULL);
+ return Prompter::UniquePtr();
}
void OperationContext::setTunnelCallback(jobject jtunnelcb)
@@ -492,6 +492,8 @@ public:
request_out(NULL),
response_in(NULL),
response_out(NULL),
+ jrequest(NULL),
+ jresponse(NULL),
jclosecb(NULL)
{
status = apr_file_pipe_create_ex(&request_in, &request_out,
@@ -512,6 +514,8 @@ public:
apr_file_t *response_in;
apr_file_t *response_out;
apr_status_t status;
+ jobject jrequest;
+ jobject jresponse;
jobject jclosecb;
};
@@ -523,7 +527,10 @@ jobject create_Channel(const char *class
jmethodID ctor = env->GetMethodID(cls, "<init>", "(J)V");
if (JNIUtil::isJavaExceptionThrown())
return NULL;
- return env->NewObject(cls, ctor, reinterpret_cast<jlong>(fd));
+ jobject channel = env->NewObject(cls, ctor, reinterpret_cast<jlong>(fd));
+ if (JNIUtil::isJavaExceptionThrown())
+ return NULL;
+ return env->NewGlobalRef(channel);
}
jobject create_RequestChannel(JNIEnv *env, apr_file_t *fd)
@@ -534,6 +541,24 @@ jobject create_ResponseChannel(JNIEnv *e
{
return create_Channel(JAVAHL_CLASS("/util/ResponseChannel"), env, fd);
}
+void close_TunnelChannel(JNIEnv* env, jobject channel)
+{
+ // Usually after this function, the memory will be freed behind
+ // 'TunnelChannel.nativeChannel'. Ask Java side to forget it. This is the
+ // only way to avoid a JVM crash when 'TunnelAgent' tries to read/write,
+ // not knowing that 'TunnelChannel' is already closed in native side.
+ static jmethodID mid = 0;
+ if (0 == mid)
+ {
+ jclass cls;
+ SVN_JNI_CATCH_VOID(
+ cls = env->FindClass(JAVAHL_CLASS("/util/TunnelChannel")));
+ SVN_JNI_CATCH_VOID(mid = env->GetMethodID(cls, "syncClose", "()V"));
+ }
+
+ SVN_JNI_CATCH_VOID(env->CallVoidMethod(channel, mid));
+ env->DeleteGlobalRef(channel);
+}
} // anonymous namespace
svn_boolean_t
@@ -590,10 +615,10 @@ OperationContext::openTunnel(svn_stream_
JNIEnv *env = JNIUtil::getEnv();
- jobject jrequest = create_RequestChannel(env, tc->request_in);
+ tc->jrequest = create_RequestChannel(env, tc->request_in);
SVN_JNI_CATCH(, SVN_ERR_BASE);
- jobject jresponse = create_ResponseChannel(env, tc->response_out);
+ tc->jresponse = create_ResponseChannel(env, tc->response_out);
SVN_JNI_CATCH(, SVN_ERR_BASE);
jstring jtunnel_name = JNIUtil::makeJString(tunnel_name);
@@ -623,29 +648,32 @@ OperationContext::openTunnel(svn_stream_
}
jobject jtunnelcb = jobject(tunnel_baton);
- SVN_JNI_CATCH(
- tc->jclosecb = env->CallObjectMethod(
- jtunnelcb, mid, jrequest, jresponse,
- jtunnel_name, juser, jhostname, jint(port)),
- SVN_ERR_BASE);
+ tc->jclosecb = env->CallObjectMethod(
+ jtunnelcb, mid, tc->jrequest, tc->jresponse,
+ jtunnel_name, juser, jhostname, jint(port));
+ svn_error_t* openTunnelError = JNIUtil::checkJavaException(SVN_ERR_BASE);
+ if (SVN_NO_ERROR != openTunnelError)
+ {
+ // OperationContext::closeTunnel() will never be called, clean up here.
+ // This also prevents a JVM native crash, see comment in
+ // close_TunnelChannel().
+ *close_baton = 0;
+ tc->jclosecb = 0;
+ OperationContext::closeTunnel(tc, 0);
+ SVN_ERR(openTunnelError);
+ }
+
+ if (tc->jclosecb)
+ {
+ tc->jclosecb = env->NewGlobalRef(tc->jclosecb);
+ SVN_JNI_CATCH(, SVN_ERR_BASE);
+ }
return SVN_NO_ERROR;
}
-void
-OperationContext::closeTunnel(void *tunnel_context, void *)
+void callCloseTunnelCallback(JNIEnv* env, jobject jclosecb)
{
- TunnelContext* tc = static_cast<TunnelContext*>(tunnel_context);
- jobject jclosecb = tc->jclosecb;
- delete tc;
-
- if (!jclosecb)
- return;
-
- JNIEnv *env = JNIUtil::getEnv();
- if (JNIUtil::isJavaExceptionThrown())
- return;
-
static jmethodID mid = 0;
if (0 == mid)
{
@@ -656,4 +684,41 @@ OperationContext::closeTunnel(void *tunn
SVN_JNI_CATCH_VOID(mid = env->GetMethodID(cls, "closeTunnel", "()V"));
}
SVN_JNI_CATCH_VOID(env->CallVoidMethod(jclosecb, mid));
+ env->DeleteGlobalRef(jclosecb);
+}
+
+void
+OperationContext::closeTunnel(void *tunnel_context, void *)
+{
+ TunnelContext* tc = static_cast<TunnelContext*>(tunnel_context);
+ jobject jrequest = tc->jrequest;
+ jobject jresponse = tc->jresponse;
+ jobject jclosecb = tc->jclosecb;
+
+ // Note that this closes other end of the pipe, which cancels and
+ // prevents further read/writes in 'TunnelAgent'
+ delete tc;
+
+ JNIEnv *env = JNIUtil::getEnv();
+
+ // Cleanup is important, otherwise TunnelAgent may crash when
+ // accessing freed native objects. For this reason, cleanup is done
+ // despite a pending exception. If more exceptions occur, they are
+ // stashed as well in order to complete all cleanup steps.
+ StashException ex(env);
+
+ if (jclosecb)
+ callCloseTunnelCallback(env, jclosecb);
+
+ if (jrequest)
+ {
+ ex.stashException();
+ close_TunnelChannel(env, jrequest);
+ }
+
+ if (jresponse)
+ {
+ ex.stashException();
+ close_TunnelChannel(env, jresponse);
+ }
}
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/OperationContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/OperationContext.h?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/OperationContext.h (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/OperationContext.h Fri Jan 14 14:01:45 2022
@@ -37,6 +37,7 @@
#include <jni.h>
#include "Pool.h"
#include "JNIStringHolder.h"
+#include "CxxCompat.hpp"
class Prompter;
@@ -52,7 +53,7 @@ class OperationContext
apr_hash_t * m_config;
- std::auto_ptr<Prompter> m_prompter;
+ JavaHL::cxx::owned_ptr<Prompter> m_prompter;
svn_atomic_t m_cancelOperation;
protected:
@@ -90,7 +91,7 @@ class OperationContext
virtual void username(const char *pi_username);
virtual void password(const char *pi_password);
- virtual void setPrompt(std::auto_ptr<Prompter> prompter);
+ virtual void setPrompt(JavaHL::cxx::owned_ptr<Prompter> prompter);
svn_auth_baton_t *getAuthBaton(SVN::Pool &in_pool);
void cancelOperation();
@@ -100,7 +101,7 @@ class OperationContext
const char *getConfigDirectory() const;
const char *getUsername() const;
const char *getPassword() const;
- std::auto_ptr<Prompter> clonePrompter() const;
+ JavaHL::cxx::owned_ptr<Prompter> clonePrompter() const;
/**
* Set the configuration directory, taking the usual steps to
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Path.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Path.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Path.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Path.cpp Fri Jan 14 14:01:45 2022
@@ -28,6 +28,7 @@
#include "Path.h"
#include "svn_path.h"
#include "svn_dirent_uri.h"
+#include "private/svn_dirent_uri_private.h"
#include "JNIUtil.h"
#include "JNIStringHolder.h"
#include "Pool.h"
@@ -164,6 +165,6 @@ URL::initfunc(const char*& path, SVN::Po
svn_error_t*
Relpath::initfunc(const char*& path, SVN::Pool& pool)
{
- path = svn_relpath__internal_style(path, pool.getPool());
- return SVN_NO_ERROR;
+ apr_pool_t *const p = pool.getPool();
+ return svn_error_trace(svn_relpath__make_internal(&path, path, p, p));
}
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Prompter.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Prompter.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Prompter.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Prompter.cpp Fri Jan 14 14:01:45 2022
@@ -45,7 +45,7 @@
Prompter::UniquePtr Prompter::create(jobject jprompter)
{
if (!jprompter)
- return UniquePtr(NULL);
+ return UniquePtr();
// Make sure no C++ exceptions are propagated from here.
const ::Java::Env jenv;
@@ -53,12 +53,12 @@ Prompter::UniquePtr Prompter::create(job
{
const jclass cls = ::Java::ClassCache::get_authn_cb(jenv)->get_class();
if (!jenv.IsInstanceOf(jprompter, cls))
- return UniquePtr(NULL);
+ return UniquePtr();
return UniquePtr(new Prompter(jenv, jprompter));
}
SVN_JAVAHL_JNI_CATCH;
- return UniquePtr(NULL);
+ return UniquePtr();
}
Prompter::UniquePtr Prompter::clone() const
@@ -431,7 +431,7 @@ svn_error_t *Prompter::dispatch_plaintex
Prompter::UniquePtr CompatPrompter::create(jobject jprompter)
{
if (!jprompter)
- return UniquePtr(NULL);
+ return UniquePtr();
// Make sure no C++ exceptions are propagated from here.
const ::Java::Env jenv;
@@ -440,12 +440,12 @@ Prompter::UniquePtr CompatPrompter::crea
const jclass cls =
::Java::ClassCache::get_user_passwd_cb(jenv)->get_class();
if (!jenv.IsInstanceOf(jprompter, cls))
- return UniquePtr(NULL);
+ return UniquePtr();
return UniquePtr(new CompatPrompter(jenv, jprompter));
}
SVN_JAVAHL_JNI_CATCH;
- return UniquePtr(NULL);
+ return UniquePtr();
}
Prompter::UniquePtr CompatPrompter::clone() const
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Prompter.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Prompter.h?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Prompter.h (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/Prompter.h Fri Jan 14 14:01:45 2022
@@ -35,10 +35,13 @@
#include "jniwrapper/jni_globalref.hpp"
+#include "CxxCompat.hpp"
+
+
class Prompter
{
public:
- typedef ::std::auto_ptr<Prompter> UniquePtr;
+ typedef ::JavaHL::cxx::owned_ptr<Prompter> UniquePtr;
/**
* Factory method; @a prompter is a local reference to the Java
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSession.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSession.cpp Fri Jan 14 14:01:45 2022
@@ -104,7 +104,9 @@ RemoteSession::open(jint jretryAttempts,
jobject jremoteSession = open(
jretryAttempts, url.c_str(), uuid,
(jconfigDirectory ? configDirectory.c_str() : NULL),
- usernameStr, passwordStr, prompter, jprogress, jcfgcb, jtunnelcb);
+ usernameStr, passwordStr,
+ JavaHL::cxx::move(prompter),
+ jprogress, jcfgcb, jtunnelcb);
if (JNIUtil::isExceptionThrown() || !jremoteSession)
jremoteSession = NULL;
return jremoteSession;
@@ -120,7 +122,9 @@ RemoteSession::open(jint jretryAttempts,
{
RemoteSession* session = new RemoteSession(
jretryAttempts, url, uuid, configDirectory,
- usernameStr, passwordStr, prompter, jcfgcb, jtunnelcb);
+ usernameStr, passwordStr,
+ JavaHL::cxx::move(prompter),
+ jcfgcb, jtunnelcb);
if (JNIUtil::isJavaExceptionThrown() || !session)
{
delete session;
@@ -169,7 +173,7 @@ RemoteSession::open(jint jretryAttempts,
namespace{
struct compare_c_strings
{
- bool operator()(const char* a, const char* b)
+ bool operator()(const char* a, const char* b) const
{
return (0 < std::strcmp(a, b));
}
@@ -187,18 +191,21 @@ RemoteSession::RemoteSession(int retryAt
: m_session(NULL), m_context(NULL)
{
m_context = new RemoteSessionContext(
- pool, configDirectory, username, password, prompter, jcfgcb, jtunnelcb);
+ pool, configDirectory, username, password,
+ JavaHL::cxx::move(prompter),
+ jcfgcb, jtunnelcb);
if (JNIUtil::isJavaExceptionThrown())
return;
const char* corrected_url = NULL;
+ const char* redirect_url = NULL;
bool cycle_detected = false;
attempt_set attempted;
while (retryAttempts-- >= 0)
{
SVN_JNI_ERR(
- svn_ra_open4(&m_session, &corrected_url,
+ svn_ra_open5(&m_session, &corrected_url, &redirect_url,
url, uuid, m_context->getCallbacks(),
m_context->getCallbackBaton(),
m_context->getConfigData(),
@@ -208,7 +215,7 @@ RemoteSession::RemoteSession(int retryAt
if (!corrected_url)
break;
- attempt_insert result = attempted.insert(corrected_url);
+ attempt_insert result = attempted.insert(redirect_url);
if (!result.second)
{
cycle_detected = true;
@@ -421,31 +428,31 @@ byte_array_to_svn_string(JNIByteArray& a
void
RemoteSession::changeRevisionProperty(
jlong jrevision, jstring jname,
- jbyteArray jold_value, jbyteArray jvalue)
+ jbyteArray jold_propval, jbyteArray jpropval)
{
JNIStringHolder name(jname);
if (JNIUtil::isExceptionThrown())
return;
- JNIByteArray old_value(jold_value);
+ JNIByteArray old_propval(jold_propval);
if (JNIUtil::isExceptionThrown())
return;
- JNIByteArray value(jvalue);
+ JNIByteArray propval(jpropval);
if (JNIUtil::isExceptionThrown())
return;
SVN::Pool subPool(pool);
- svn_string_t* const* p_old_value = NULL;
- svn_string_t* const str_old_value =
- byte_array_to_svn_string(old_value, subPool);
- if (str_old_value)
- p_old_value = &str_old_value;
+ svn_string_t* const* p_old_propval = NULL;
+ svn_string_t* const str_old_propval =
+ byte_array_to_svn_string(old_propval, subPool);
+ if (str_old_propval)
+ p_old_propval = &str_old_propval;
SVN_JNI_ERR(svn_ra_change_rev_prop2(m_session,
svn_revnum_t(jrevision),
- name, p_old_value,
- byte_array_to_svn_string(value, subPool),
+ name, p_old_propval,
+ byte_array_to_svn_string(propval, subPool),
subPool.getPool()), );
}
@@ -856,7 +863,8 @@ RemoteSession::status(jobject jthis, jst
editor->delta_editor(),
editor->delta_baton(),
report_pool),);
- rp->set_reporter_data(raw_reporter, report_baton, editor);
+ rp->set_reporter_data(raw_reporter, report_baton,
+ JavaHL::cxx::move(editor));
}
// TODO: diff
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSession.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSession.h?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSession.h (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSession.h Fri Jan 14 14:01:45 2022
@@ -71,8 +71,8 @@ class RemoteSession : public SVNBase
jlong getLatestRevision();
jlong getRevisionByTimestamp(jlong jtimestamp);
void changeRevisionProperty(jlong jrevision, jstring jname,
- jbyteArray jold_value,
- jbyteArray jvalue);
+ jbyteArray jold_propval,
+ jbyteArray jpropval);
jobject getRevisionProperties(jlong jrevision);
jbyteArray getRevisionProperty(jlong jrevision, jstring jname);
jlong getFile(jlong jrevision, jstring jpath,
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSessionContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSessionContext.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSessionContext.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSessionContext.cpp Fri Jan 14 14:01:45 2022
@@ -43,7 +43,7 @@ RemoteSessionContext::RemoteSessionConte
if (passwordStr != NULL)
password(passwordStr);
- setPrompt(prompter);
+ setPrompt(JavaHL::cxx::move(prompter));
setConfigEventHandler(jcfgcb);
setTunnelCallback(jtunnelcb);
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSessionContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSessionContext.h?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSessionContext.h (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/RemoteSessionContext.h Fri Jan 14 14:01:45 2022
@@ -30,6 +30,7 @@
#include "svn_ra.h"
#include "OperationContext.h"
+#include "CxxCompat.hpp"
class RemoteSessionContext : public OperationContext
{
@@ -37,7 +38,7 @@ class RemoteSessionContext : public Oper
RemoteSessionContext(SVN::Pool &pool,
const char* jconfigDirectory,
const char* jusername, const char* jpassword,
- std::auto_ptr<Prompter> prompter,
+ JavaHL::cxx::owned_ptr<Prompter> prompter,
jobject jcfgcb, jobject jtunnelcb);
virtual ~RemoteSessionContext();
void activate(jobject jremoteSession, jobject jprogress);
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/SVNBase.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/SVNBase.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/SVNBase.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/SVNBase.cpp Fri Jan 14 14:01:45 2022
@@ -107,13 +107,9 @@ jobject SVNBase::createCppBoundObject(co
if (JNIUtil::isJavaExceptionThrown())
return NULL;
- static jmethodID ctor = 0;
- if (ctor == 0)
- {
- ctor = env->GetMethodID(clazz, "<init>", "(J)V");
- if (JNIUtil::isJavaExceptionThrown())
- return NULL;
- }
+ jmethodID ctor = env->GetMethodID(clazz, "<init>", "(J)V");
+ if (JNIUtil::isJavaExceptionThrown())
+ return NULL;
jlong cppAddr = this->getCppAddr();
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/SVNClient.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/SVNClient.cpp Fri Jan 14 14:01:45 2022
@@ -1284,7 +1284,9 @@ void SVNClient::blame(const char *path,
if (ctx == NULL)
return;
- SVN_JNI_ERR(svn_client_blame5(
+ SVN_JNI_ERR(svn_client_blame6(
+ callback->get_start_revnum_p(),
+ callback->get_end_revnum_p(),
intPath.c_str(), pegRevision.revision(), revisionStart.revision(),
revisionEnd.revision(),
options.fileOptions(subPool), ignoreMimeType,
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/StateReporter.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/StateReporter.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/StateReporter.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/StateReporter.cpp Fri Jan 14 14:01:45 2022
@@ -38,7 +38,7 @@ StateReporter::StateReporter()
: m_valid(false),
m_raw_reporter(NULL),
m_report_baton(NULL),
- m_editor(NULL),
+ m_editor(),
m_target_revision(SVN_INVALID_REVNUM)
{}
@@ -182,7 +182,7 @@ StateReporter::set_reporter_data(const s
{
//DEBUG:fprintf(stderr, " (n) StateReporter::set_reporter_data()\n");
- m_editor = editor;
+ m_editor = JavaHL::cxx::move(editor);
m_raw_reporter = raw_reporter;
m_report_baton = report_baton;
m_valid = true;
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp Fri Jan 14 14:01:45 2022
@@ -42,10 +42,11 @@
#include "../Credential.hpp"
#include "../ExternalItem.hpp"
#include "../EditorCallbacks.hpp"
+#include "../CxxCompat.hpp"
namespace
{
-/* This class behaves like a dumbed-down std:auto_ptr, but it
+/* This class behaves like a dumbed-down std:unique_ptr, but it
implements atomic access and modification of the wrapped
pointer. */
class ClassImplPtr
@@ -132,11 +133,11 @@ class ClassCacheImpl
// The statically initialized calss wrappers are always defined and
// therefore do not need atomic access.
-#define JNIWRAPPER_DEFINE_CACHED_CLASS(M, C) \
- std::auto_ptr<Object::ClassImpl> m_impl_##M; \
- const Object::ClassImpl* get_##M(Env) \
- { \
- return m_impl_##M.get(); \
+#define JNIWRAPPER_DEFINE_CACHED_CLASS(M, C) \
+ JavaHL::cxx::owned_ptr<Object::ClassImpl> m_impl_##M; \
+ const Object::ClassImpl* get_##M(Env) \
+ { \
+ return m_impl_##M.get(); \
}
JNIWRAPPER_DEFINE_CACHED_CLASS(object, Object)
@@ -153,7 +154,7 @@ class ClassCacheImpl
Object::ClassImpl* pimpl = m_impl_##M.get(); \
if (!pimpl) \
{ \
- std::auto_ptr<Object::ClassImpl> tmp( \
+ JavaHL::cxx::owned_ptr<Object::ClassImpl> tmp( \
new C::ClassImpl( \
env, env.FindClass(C::m_class_name))); \
pimpl = m_impl_##M.test_and_set(tmp.get()); \
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp Fri Jan 14 14:01:45 2022
@@ -27,6 +27,8 @@
#include "svn_private_config.h"
+#include "../CxxCompat.hpp"
+
// Stream-wrapper-specific mark object type
struct svn_stream_mark_t
{
@@ -197,7 +199,7 @@ InputStream::get_global_stream(Env env,
const bool has_mark = InputStream(env, jstream).mark_supported();
- std::auto_ptr<GlobalObject> baton(new GlobalObject(env, jstream));
+ JavaHL::cxx::owned_ptr<GlobalObject> baton(new GlobalObject(env, jstream));
svn_stream_t* const stream = svn_stream_create(baton.get(), pool.getPool());
svn_stream_set_read2(stream, global_stream_read,
@@ -268,7 +270,7 @@ OutputStream::get_global_stream(Env env,
if (!jstream)
return NULL;
- std::auto_ptr<GlobalObject> baton(new GlobalObject(env, jstream));
+ JavaHL::cxx::owned_ptr<GlobalObject> baton(new GlobalObject(env, jstream));
svn_stream_t* const stream = svn_stream_create(baton.get(), pool.getPool());
svn_stream_set_write(stream, global_stream_write);
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/jniwrapper/jni_string_map.hpp Fri Jan 14 14:01:45 2022
@@ -144,7 +144,8 @@ protected:
{
const jstring jkey =
jstring(m_env.CallObjectMethod(m_jthis, impl().m_mid_get_key));
- const String::Contents key(String(m_env, jkey));
+ const String str(m_env, jkey);
+ const String::Contents key(str);
return std::string(key.c_str());
}
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Fri Jan 14 14:01:45 2022
@@ -280,7 +280,7 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
- cl->getClientContext().setPrompt(prompter);
+ cl->getClientContext().setPrompt(JavaHL::cxx::move(prompter));
}
JNIEXPORT void JNICALL
@@ -298,7 +298,7 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
- cl->getClientContext().setPrompt(prompter);
+ cl->getClientContext().setPrompt(JavaHL::cxx::move(prompter));
}
JNIEXPORT void JNICALL
@@ -1656,10 +1656,11 @@ Java_org_apache_subversion_javahl_SVNCli
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_blame
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jpegRevision,
+(JNIEnv *env, jobject jthis,
+ jstring jpath, jobject jpegRevision,
jobject jrevisionStart, jobject jrevisionEnd, jboolean jignoreMimeType,
- jboolean jincludeMergedRevisions, jobject jblameCallback,
- jobject jdiffOptions)
+ jboolean jincludeMergedRevisions, jobject jdiffOptions,
+ jobject jrangeCallback, jobject jlineCallback)
{
JNIEntry(SVNClient, blame);
SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1688,7 +1689,7 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
- BlameCallback callback(jblameCallback);
+ BlameCallback callback(jrangeCallback, jlineCallback);
cl->blame(path, pegRevision, revisionStart, revisionEnd,
jignoreMimeType ? true : false,
jincludeMergedRevisions ? true : false, &callback,
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp Fri Jan 14 14:01:45 2022
@@ -157,13 +157,13 @@ Java_org_apache_subversion_javahl_remote
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_remote_RemoteSession_nativeChangeRevisionProperty(
JNIEnv *env, jobject jthis, jlong jrevision, jstring jname,
- jbyteArray jold_value, jbyteArray jvalue)
+ jbyteArray jold_propval, jbyteArray jpropval)
{
JNIEntry(RemoteSession, nativeChangeRevisionProperty);
RemoteSession *ras = RemoteSession::getCppObject(jthis);
CPPADDR_NULL_PTR(ras, );
- return ras->changeRevisionProperty(jrevision, jname, jold_value, jvalue);
+ return ras->changeRevisionProperty(jrevision, jname, jold_propval, jpropval);
}
JNIEXPORT jobject JNICALL
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp Fri Jan 14 14:01:45 2022
@@ -185,12 +185,12 @@ Java_org_apache_subversion_javahl_util_C
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_set_1str(
JNIEnv* env, jobject jthis, jstring jcategory, jlong jcontext,
- jstring jsection, jstring joption, jstring jvalue)
+ jstring jsection, jstring joption, jstring jconfigval)
{
JNIEntry(ConfigImpl$Category, set_str);
const ImplContext ctx(env, jthis, jcategory, jcontext, jsection, joption);
- JNIStringHolder value(jvalue);
+ JNIStringHolder value(jconfigval);
if (JNIUtil::isJavaExceptionThrown())
return;
@@ -202,27 +202,27 @@ Java_org_apache_subversion_javahl_util_C
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_set_1bool(
JNIEnv* env, jobject jthis, jstring jcategory, jlong jcontext,
- jstring jsection, jstring joption, jboolean jvalue)
+ jstring jsection, jstring joption, jboolean jconfigval)
{
JNIEntry(ConfigImpl$Category, set_bool);
const ImplContext ctx(env, jthis, jcategory, jcontext, jsection, joption);
svn_config_set_bool(ctx.m_config,
ctx.m_section.c_str(), ctx.m_option.c_str(),
- bool(jvalue));
+ bool(jconfigval));
}
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_set_1long(
JNIEnv* env, jobject jthis, jstring jcategory, jlong jcontext,
- jstring jsection, jstring joption, jlong jvalue)
+ jstring jsection, jstring joption, jlong jconfigval)
{
JNIEntry(ConfigImpl$Category, set_long);
const ImplContext ctx(env, jthis, jcategory, jcontext, jsection, joption);
svn_config_set_int64(ctx.m_config,
ctx.m_section.c_str(), ctx.m_option.c_str(),
- apr_int64_t(jvalue));
+ apr_int64_t(jconfigval));
}
JNIEXPORT jobject JNICALL
@@ -287,16 +287,16 @@ Java_org_apache_subversion_javahl_util_C
jstring jname = JNIUtil::makeJString(name);
if (JNIUtil::isJavaExceptionThrown())
return false;
- jstring jvalue = JNIUtil::makeJString(value);
+ jstring jconfigval = JNIUtil::makeJString(value);
if (JNIUtil::isJavaExceptionThrown())
return false;
- e->CallVoidMethod(jh, mid, jname, jvalue);
+ e->CallVoidMethod(jh, mid, jname, jconfigval);
if (JNIUtil::isJavaExceptionThrown())
return false;
e->DeleteLocalRef(jname);
- e->DeleteLocalRef(jvalue);
+ e->DeleteLocalRef(jconfigval);
return true;
}
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp Fri Jan 14 14:01:45 2022
@@ -210,13 +210,13 @@ private:
const bool m_old_format;
SVN::Pool& m_iterpool;
};
-} // anoymous namespace
+} // anonymous namespace
JNIEXPORT jbyteArray JNICALL
Java_org_apache_subversion_javahl_util_PropLib_checkNodeProp(
JNIEnv* jenv, jobject jthis,
- jstring jname, jbyteArray jvalue, jstring jpath, jobject jkind,
+ jstring jname, jbyteArray jpropval, jstring jpath, jobject jkind,
jstring jmime_type, jobject jfile_contents,
jboolean jskip_some_checks)
{
@@ -228,7 +228,7 @@ Java_org_apache_subversion_javahl_util_P
SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env);
const Java::String name_str(env, jname);
- const Java::ByteArray value(env, jvalue);
+ const Java::ByteArray value(env, jpropval);
const Java::String path_str(env, jpath);
const Java::String mime_type_str(env, jmime_type);
Java::InputStream file_contents(env, jfile_contents);
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp Fri Jan 14 14:01:45 2022
@@ -37,6 +37,7 @@
#include "JNIUtil.h"
#include "NativeStream.hpp"
#include "Utility.hpp"
+#include "CxxCompat.hpp"
#include <apr_hash.h>
@@ -165,7 +166,7 @@ Java_org_apache_subversion_javahl_util_S
const Java::Env env(jenv);
// We'll allocate the stream in the bound object's pool.
- std::auto_ptr<JavaHL::NativeInputStream>
+ JavaHL::cxx::owned_ptr<JavaHL::NativeInputStream>
translated(new JavaHL::NativeInputStream());
svn_stream_t* source = Java::InputStream::get_global_stream(
env, jsource, translated->get_pool());
@@ -194,12 +195,12 @@ Java_org_apache_subversion_javahl_util_S
jstring jurl, jstring jrepos_root_url,
jobject jdate, jstring jauthor)
{
- SVN_JAVAHL_JNI_TRY(SubstLib, translateInputStream)
+ SVN_JAVAHL_JNI_TRY(SubstLib, translateOutputStream)
{
const Java::Env env(jenv);
// We'll allocate the stream in the bound object's pool.
- std::auto_ptr<JavaHL::NativeOutputStream>
+ JavaHL::cxx::owned_ptr<JavaHL::NativeOutputStream>
translated(new JavaHL::NativeOutputStream());
svn_stream_t* destination = Java::OutputStream::get_global_stream(
env, jdestination, translated->get_pool());
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientException.java Fri Jan 14 14:01:45 2022
@@ -30,9 +30,10 @@ import java.util.List;
*/
public class ClientException extends NativeException
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 2L;
/**
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java Fri Jan 14 14:01:45 2022
@@ -36,9 +36,10 @@ import java.util.EventObject;
*/
public class ClientNotifyInformation extends EventObject
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 2L;
/**
@@ -199,7 +200,7 @@ public class ClientNotifyInformation ext
}
/**
- * @deprecated Constructor compatible with teh 1.8 API; uses
+ * @deprecated Constructor compatible with the 1.8 API; uses
* <code>null</code> URL and errMsgStack values.
*/
@Deprecated
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitInfo.java Fri Jan 14 14:01:45 2022
@@ -32,9 +32,10 @@ import org.apache.subversion.javahl.type
*/
public class CommitInfo implements java.io.Serializable
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 1L;
/** the revision committed */
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItem.java Fri Jan 14 14:01:45 2022
@@ -30,9 +30,10 @@ import org.apache.subversion.javahl.type
*/
public class CommitItem implements java.io.Serializable
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 1L;
/**
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/DiffSummary.java Fri Jan 14 14:01:45 2022
@@ -33,9 +33,10 @@ import org.apache.subversion.javahl.type
*/
public class DiffSummary extends EventObject
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 1L;
private DiffKind diffKind;
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Fri Jan 14 14:01:45 2022
@@ -33,7 +33,7 @@ import java.util.Set;
import java.util.Map;
/**
- * This interface is the commom interface for all subversion
+ * This interface is the common interface for all subversion
* operations. It is implemented by SVNClient
*
* @since 1.7
@@ -65,7 +65,7 @@ public interface ISVNClient
* @return The name of the working copy's administrative
* directory, which is usually <code>.svn</code>.
* @see <a
- * href="http://svn.apache.org/repos/asf/subversion/trunk/notes/asp-dot-net-hack.txt">
+ * href="https://svn.apache.org/repos/asf/subversion/trunk/notes/asp-dot-net-hack.txt">
* Instructions on changing this as a work-around for the behavior of
* ASP.Net on Windows.</a>
*/
@@ -89,7 +89,7 @@ public interface ISVNClient
* has effect when <code>onServer</code> is
* <code>true</code>.
* @param getAll get status for uninteresting (unchanged) files.
- * @param noIgnore get status for normaly ignored files and directories.
+ * @param noIgnore get status for normally ignored files and directories.
* @param ignoreExternals if externals are ignored during status
* @param depthAsSticky When set, interpret <code>depth</code> as
* the ambient depth of the working copy.
@@ -633,7 +633,7 @@ public interface ISVNClient
* @param noIgnore whether to add files matched by ignore patterns
* @param noAutoProps if true, ignore any auto-props configuration
* @param ignoreUnknownNodeTypes whether to ignore files which
- * the node type is not konwn, just as pipes
+ * the node type is not known, just as pipes
* @param revpropTable A string-to-string mapping of revision properties
* to values which will be set if this operation
* results in a commit.
@@ -664,7 +664,7 @@ public interface ISVNClient
* @param depth depth to traverse into subdirectories
* @param noIgnore whether to add files matched by ignore patterns
* @param ignoreUnknownNodeTypes whether to ignore files which
- * the node type is not konwn, just as pipes
+ * the node type is not known, just as pipes
* @param revpropTable A string-to-string mapping of revision properties
* to values which will be set if this operation
* results in a commit.
@@ -1386,7 +1386,7 @@ public interface ISVNClient
/**
* Retrieve the content together with the author, the revision and the date
- * of the last change of each line
+ * of the last change of each line.
* @param path the path
* @param pegRevision the revision to interpret the path
* @param revisionStart the first revision to show
@@ -1394,17 +1394,37 @@ public interface ISVNClient
* @param ignoreMimeType whether or not to ignore the mime-type
* @param includeMergedRevisions whether or not to include extra merge
* information
- * @param callback callback to receive the file content and the other
- * information
* @param options additional options for controlling the output
+ * @param rangeCallback receives the resolved revision range; called
+ * exactly once before #lineCallback
+ * @param lineCallback callback to receive the file content and the other
+ * information for every line in the file
* @throws ClientException
- * @since 1.9
+ * @since 1.12
+ */
+ void blame(String path, Revision pegRevision, Revision revisionStart,
+ Revision revisionEnd, boolean ignoreMimeType,
+ boolean includeMergedRevisions, DiffOptions options,
+ BlameRangeCallback rangeCallback,
+ BlameLineCallback lineCallback)
+ throws ClientException;
+
+ /**
+ * Retrieve the content together with the author, the revision and the date
+ * of the last change of each line
+ * <p>
+ * Behaves like the 1.12 version but uses BlameCallback instead of
+ * BlameLineCallback. The former expects that file contents can be
+ * converted from UTF-8 to a String, which is not true in general
+ * and may throw exceptions.
+ * @deprecated Use the 1.12 version with BlameLineCallback
*/
+ @Deprecated
void blame(String path, Revision pegRevision, Revision revisionStart,
Revision revisionEnd, boolean ignoreMimeType,
boolean includeMergedRevisions,
BlameCallback callback, DiffOptions options)
- throws ClientException;
+ throws ClientException;
/**
* Retrieve the content together with the author, the revision and the date
@@ -1412,12 +1432,14 @@ public interface ISVNClient
* <p>
* Behaves like the 1.9 version with <code>options</code> set to
* their default values.
+ * @deprecated Use the 1.12 version with BlameLineCallback
*/
+ @Deprecated
void blame(String path, Revision pegRevision, Revision revisionStart,
Revision revisionEnd, boolean ignoreMimeType,
boolean includeMergedRevisions,
BlameCallback callback)
- throws ClientException;
+ throws ClientException;
/**
* Set directory for the configuration information, taking the
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java Fri Jan 14 14:01:45 2022
@@ -34,7 +34,7 @@ import java.util.Map;
* <p>
* <b>This interface is EXPERIMENTAL.
* It may change or be removed in a future version of JavaHL</b>
- * @see <a href="http://svn.apache.org/repos/asf/subversion/trunk/subversion/include/private/svn_editor.h">svn_editor.h</a>
+ * @see <a href="https://svn.apache.org/repos/asf/subversion/trunk/subversion/include/private/svn_editor.h">svn_editor.h</a>
* for all restrictions on driving an editor.
* @since 1.9
*/
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java Fri Jan 14 14:01:45 2022
@@ -34,7 +34,7 @@ import java.io.OutputStream;
/**
* Encapsulates an RA session object and related operations.
- * @see <a href="http://svn.apache.org/repos/asf/subversion/trunk/subversion/include/svn_ra.h">svn_ra.h</a>,
+ * @see <a href="https://svn.apache.org/repos/asf/subversion/trunk/subversion/include/svn_ra.h">svn_ra.h</a>,
* the documentation of the <code>svn_ra_open</code> function.
* @since 1.9
*/
@@ -121,7 +121,7 @@ public interface ISVNRemote
*<p>
* <b>Note:</b> If the server has Capability.atomic_revprops and
* <code>oldValue</code> is not <code>null</code>, and the present
- * value of the propery is not <code>oldValue</code> (e.g., if
+ * value of the property is not <code>oldValue</code> (e.g., if
* another client changed the property), then the operation will
* fail.
*<p>
@@ -129,8 +129,8 @@ public interface ISVNRemote
* Capability.atomic_revprops, then <code>oldValue</code>
* <em>must</em> be <code>null</code>.
*<p>
- * @param revision The revision to which the propery is attached
- * @param propertyName The name of the propery
+ * @param revision The revision to which the property is attached
+ * @param propertyName The name of the property
* @param oldValue The previous value of the property (see note below)
* @param newValue The new value of the property. If <code>newValue</code>
* is <code>null</code>, the property will be deleted.
@@ -280,7 +280,7 @@ public interface ISVNRemote
* <p>
* <code>direntFields</code> controls which portions of the DirEntry
* objects are filled in. To have them completely filled in, just pass
- * DirEntry.Fields.all, othewise pass a bitwise OR of any of the
+ * DirEntry.Fields.all, otherwise pass a bitwise OR of any of the
* DirEntry.Fields flags you would like to have.
* <p>
* If <code>properties</code> is not <code>null</code>, set
@@ -405,8 +405,8 @@ public interface ISVNRemote
* <p>
* If <code>startRevision</code> or <code>endRevision</code> is
* {@link org.apache.subversion.javahl.types.Revision#SVN_INVALID_REVNUM},
- * the HEAD revision is uses for that argument. If eiter is an
- * invaild non-existent revision, an error will be returned.
+ * the HEAD revision is uses for that argument. If either is an
+ * invalid non-existent revision, an error will be returned.
* <p>
* If <code>paths</code> is not <code>null</code> and has one or
* more elements, then only show revisions in which at least one
@@ -519,7 +519,7 @@ public interface ISVNRemote
}
/**
- * @return The repository-relative path of the obejct in this
+ * @return The repository-relative path of the object in this
* history segment.
*/
public String getPath() { return path; }
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java Fri Jan 14 14:01:45 2022
@@ -96,7 +96,7 @@ public interface ISVNRepos {
* @param dataOut the data will be outputed here
* @param start the first revision to be dumped
* @param end the last revision to be dumped
- * @param incremental the dump will be incremantal
+ * @param incremental the dump will be incremental
* @param useDeltas the dump will contain deltas between nodes
* @param callback the callback to receive notifications
* @throws ClientException throw in case of problem
@@ -252,7 +252,7 @@ public interface ISVNRepos {
* in put optional.
* @param callback the target for processing messages
* @throws ClientException throw in case of problem
- * @note behaves like the 1.8 vesion with the revision
+ * @note behaves like the 1.8 version with the revision
* parameters set to Revision.START and Revision.HEAD.
*/
public abstract void load(File path, InputStream dataInput,
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java Fri Jan 14 14:01:45 2022
@@ -28,9 +28,10 @@ package org.apache.subversion.javahl;
*/
public class JNIError extends Error
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 1L;
/**
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeException.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeException.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeException.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeException.java Fri Jan 14 14:01:45 2022
@@ -29,9 +29,10 @@ package org.apache.subversion.javahl;
*/
class NativeException extends SubversionException
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 1L;
/**
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java Fri Jan 14 14:01:45 2022
@@ -27,7 +27,7 @@ import org.apache.subversion.javahl.type
import org.apache.subversion.javahl.types.RuntimeVersion;
/**
- * Handles activities related to management of native resouces
+ * Handles activities related to management of native resources
* (e.g. loading of native libraries).
*
* Public for backward compat. This class may disappear in future versions
@@ -142,7 +142,7 @@ public class NativeResources
private static final void init()
{
final int SVN_VER_MAJOR = 1;
- final int SVN_VER_MINOR = 12;
+ final int SVN_VER_MINOR = 15;
initNativeLibrary();
version = new Version();
if (!version.isAtLeast(SVN_VER_MAJOR, SVN_VER_MINOR, 0))
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ProgressEvent.java Fri Jan 14 14:01:45 2022
@@ -31,9 +31,10 @@ import org.apache.subversion.javahl.call
*/
public class ProgressEvent implements java.io.Serializable
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 1L;
/**
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java Fri Jan 14 14:01:45 2022
@@ -32,9 +32,10 @@ import org.apache.subversion.javahl.call
*/
public class ReposNotifyInformation extends EventObject
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 2L;
/**
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Fri Jan 14 14:01:45 2022
@@ -30,6 +30,7 @@ import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.ByteArrayOutputStream;
+import java.io.UnsupportedEncodingException;
import java.util.Collection;
import java.util.Collections;
@@ -77,7 +78,7 @@ public class SVNClient implements ISVNCl
/**
* Build the native peer
- * @return the adress of the peer
+ * @return the address of the peer
*/
private native long ctNative();
@@ -92,7 +93,7 @@ public class SVNClient implements ISVNCl
public native void finalize();
/**
- * slot for the adress of the native peer. The JNI code is the only user
+ * slot for the address of the native peer. The JNI code is the only user
* of this member
*/
protected long cppAddr;
@@ -705,6 +706,7 @@ public class SVNClient implements ISVNCl
boolean ignoreExternals)
throws ClientException;
+ @Deprecated
public void blame(String path, Revision pegRevision,
Revision revisionStart,
Revision revisionEnd, boolean ignoreMimeType,
@@ -716,13 +718,28 @@ public class SVNClient implements ISVNCl
includeMergedRevisions, callback, null);
}
+ @Deprecated
+ public void blame(String path, Revision pegRevision,
+ Revision revisionStart,
+ Revision revisionEnd, boolean ignoreMimeType,
+ boolean includeMergedRevisions,
+ BlameCallback callback,
+ DiffOptions options)
+ throws ClientException
+ {
+ blame(path, pegRevision, revisionStart, revisionEnd,
+ ignoreMimeType, includeMergedRevisions, options,
+ null, new BlameCallbackAdapter(callback));
+ }
+
public native void blame(String path, Revision pegRevision,
Revision revisionStart,
Revision revisionEnd, boolean ignoreMimeType,
boolean includeMergedRevisions,
- BlameCallback callback,
- DiffOptions options)
- throws ClientException;
+ DiffOptions options,
+ BlameRangeCallback rangeCallback,
+ BlameLineCallback lineCallback)
+ throws ClientException;
public native void setConfigDirectory(String configDir)
throws ClientException;
@@ -897,4 +914,42 @@ public class SVNClient implements ISVNCl
null);
}
}
+
+ /**
+ * A private class that adapts from BlameLineCallback to BlameCallback.
+ */
+ @Deprecated
+ private class BlameCallbackAdapter implements BlameLineCallback
+ {
+ private BlameCallback wrappedCallback = null;
+
+ public BlameCallbackAdapter(BlameCallback callback)
+ {
+ wrappedCallback = callback;
+ }
+
+ // Implementation of BlameLineCallback
+ public void singleLine(long lineNum, long revision,
+ Map<String, byte[]> revProps, long mergedRevision,
+ Map<String, byte[]> mergedRevProps,
+ String mergedPath, boolean localChange,
+ byte[] line)
+ throws ClientException
+ {
+ if (wrappedCallback == null)
+ return;
+
+ String convertedLine = null;
+ try {
+ convertedLine = new String(line, "UTF-8");
+ }
+ catch (UnsupportedEncodingException ex) {
+ throw ClientException.fromException(ex);
+ }
+
+ wrappedCallback.singleLine(lineNum, revision,
+ revProps, mergedRevision, mergedRevProps,
+ mergedPath, convertedLine, localChange);
+ }
+ }
}
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java Fri Jan 14 14:01:45 2022
@@ -65,7 +65,7 @@ public class SVNRepos implements ISVNRep
/**
* Build the native peer
- * @return the adress of the peer
+ * @return the address of the peer
*/
private native long ctNative();
@@ -81,7 +81,7 @@ public class SVNRepos implements ISVNRep
public native void finalize();
/**
- * slot for the adress of the native peer. The JNI code is the only user
+ * slot for the address of the native peer. The JNI code is the only user
* of this member
*/
protected long cppAddr;
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java Fri Jan 14 14:01:45 2022
@@ -66,7 +66,7 @@ public class SVNUtil
* remote.RemoteFactory#setPrompt}) will be called every time the
* underlying library needs access to the credentials.
* <p>
- * This mode is intented to support client implementations that
+ * This mode is intended to support client implementations that
* use their own credentials store.
* <p>
* The standard credentials store is enabled by default.
@@ -101,9 +101,10 @@ public class SVNUtil
*/
public static class CredentialTypeMismatch extends SubversionException
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 1L;
public CredentialTypeMismatch(Credential.Kind kind, String attribute)
@@ -119,9 +120,10 @@ public class SVNUtil
*/
public static class Credential implements java.io.Serializable
{
- // Update the serialVersionUID when there is a incompatible change made to
- // this class. See the java documentation for when a change is incompatible.
- // http://java.sun.com/javase/7/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 1L;
/**
@@ -701,11 +703,11 @@ public class SVNUtil
* owns the property; only used for error messages
* @param kind The node kind of the file or dir that owns the property
* @param mimeType If <code>kind</code> is {@link NodeKind.file}, this is
- * tye file's mime-type, used for extra validation for the
+ * the file's mime-type, used for extra validation for the
* <code>svn:eol-style</code> property. If it is <code>null</code>,
* the extra validation will be skipped.
* @return a canonicalized representation of the property value
- * @see http://subversion.apache.org/docs/api/latest/group__svn__wc__properties.html#ga83296313ec59cc825176224ac8282ec2
+ * @see https://subversion.apache.org/docs/api/latest/group__svn__wc__properties.html#ga83296313ec59cc825176224ac8282ec2
*/
public static byte[] canonicalizeNodeProperty(
String name, byte[] value, String path, NodeKind kind,
@@ -725,7 +727,7 @@ public class SVNUtil
* owns the property; only used for error messages
* @param kind The node kind of the file or dir that owns the property
* @param mimeType If <code>kind</code> is {@link NodeKind.file}, this is
- * tye file's mime-type, used for extra validation for the
+ * the file's mime-type, used for extra validation for the
* <code>svn:eol-style</code> property. If it is <code>null</code>,
* the extra validation will be skipped.
* @param fileContents A stream with the file's contents. Only used
@@ -734,7 +736,7 @@ public class SVNUtil
* <code>kind</code> is {@link NodeKind.file} and
* <code>mimeType</code> is not <code>null</code>.
* @return a canonicalized representation of the property value
- * @see http://subversion.apache.org/docs/api/latest/group__svn__wc__properties.html#ga83296313ec59cc825176224ac8282ec2
+ * @see https://subversion.apache.org/docs/api/latest/group__svn__wc__properties.html#ga83296313ec59cc825176224ac8282ec2
*/
public static byte[] canonicalizeNodeProperty(
String name, byte[] value, String path, NodeKind kind,
@@ -752,7 +754,7 @@ public class SVNUtil
* parsed external items.
* @param description The externals description.
* @param parentDirectory Used to construct error messages.
- * @param canonicalizeUrl Whe <code>true</code>, canonicalize the
+ * @param canonicalizeUrl When <code>true</code>, canonicalize the
* <code>url</code> member of the returned objects. If the
* <code>url</code> member refers to an absolute URL, it will
* be canonicalized as URL consistent with the way URLs are
@@ -877,7 +879,7 @@ public class SVNUtil
* Build a dictionary of expanded keyword values, given the
* contents of a file's <code>svn:keywords</code> property, its
* revision, URL, the date it was committed on, the author of the
- * commit and teh URL of the repository root.
+ * commit and the URL of the repository root.
*<p>
* Custom keywords defined in <code>svn:keywords</code> properties
* are expanded using the provided parameters and in accordance
Modified: subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SubversionException.java
URL: http://svn.apache.org/viewvc/subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SubversionException.java?rev=1897034&r1=1897033&r2=1897034&view=diff
==============================================================================
--- subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SubversionException.java (original)
+++ subversion/branches/multi-wc-format/subversion/bindings/javahl/src/org/apache/subversion/javahl/SubversionException.java Fri Jan 14 14:01:45 2022
@@ -29,13 +29,10 @@ package org.apache.subversion.javahl;
*/
public class SubversionException extends Exception
{
- // Update the serialVersionUID when there is a incompatible change
- // made to this class. See any of the following, depending upon
- // the Java release.
- // http://java.sun.com/j2se/1.3/docs/guide/serialization/spec/version.doc7.html
- // http://java.sun.com/j2se/1.4/pdf/serial-spec.pdf
- // http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/version.html#6678
- // http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678
+ // Update the serialVersionUID when there is an incompatible change made to
+ // this class. See the Java documentation (following link or its counter-
+ // part in your specific Java release) for when a change is incompatible.
+ // https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/version.html#type-changes-affecting-serialization
private static final long serialVersionUID = 1L;
/**