Author: brane
Date: Tue Jun 30 08:26:59 2015
New Revision: 1688395
URL: http://svn.apache.org/r1688395
Log:
Follow up to r1688273:
Minor spelling and documentation fixes, no functional change.
[in subversion/bindings/javahl]
* src/org/apache/subversion/javahl/callback/ReposVerifyCallback.java
(ReposVerifyCallback.onVerifyError): Fix typo in docstring.
* native/ReposVerifyCallback.h
(ReposVerifyCallback::m_jverify_cb): Renamed from m_verify_cb.
(ReposVerifyCallback::ReposVerifyCallback): Add docstring and rename
parameter.
(ReposVerifyCallback::callback): Fix docstring.
* native/ReposVerifyCallback.cpp
(ReposVerifyCallback::ReposVerifyCallback): Remove docstring. Rename
variables.
(ReposVerifyCallback::onVerifyError): Rename variables.
* tests/org/apache/subversion/javahl/SVNReposTests.java
(SVNReposTests.VerifyCallback.onVerifyError): Add braces to compound
conditional.
(SVNReposTests.tryToBreakRepo): Renamed from trytobreakrepo. Update callers.
(SVNReposTests.testVerifyBrokenRepo,
SVNReposTests.testVerifyBrokenRepo_KeepGoing): Make the test setup more
explicit.
Modified:
subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.cpp
subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.h
subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ReposVerifyCallback.java
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNReposTests.java
Modified:
subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.cpp
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.cpp?rev=1688395&r1=1688394&r2=1688395&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.cpp
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.cpp
Tue Jun 30 08:26:59 2015
@@ -27,12 +27,8 @@
#include "ReposVerifyCallback.h"
#include "JNIUtil.h"
-/**
- * Create a new object and store the Java object.
- * @param notify global reference to the Java object
- */
-ReposVerifyCallback::ReposVerifyCallback(jobject verify_cb)
- : m_verify_cb(verify_cb)
+ReposVerifyCallback::ReposVerifyCallback(jobject jverify_cb)
+ : m_jverify_cb(jverify_cb)
{}
ReposVerifyCallback::~ReposVerifyCallback()
@@ -86,7 +82,7 @@ ReposVerifyCallback::onVerifyError(svn_r
if (JNIUtil::isJavaExceptionThrown())
return;
- env->CallVoidMethod(m_verify_cb, mid, jlong(revision), jverify_err);
+ env->CallVoidMethod(m_jverify_cb, mid, jlong(revision), jverify_err);
if (verify_err)
env->DeleteLocalRef(jverify_err);
}
Modified:
subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.h?rev=1688395&r1=1688394&r2=1688395&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.h
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/ReposVerifyCallback.h
Tue Jun 30 08:26:59 2015
@@ -40,18 +40,24 @@ class ReposVerifyCallback
/**
* The local reference to the Java object.
*/
- jobject m_verify_cb;
+ jobject m_jverify_cb;
public:
- ReposVerifyCallback(jobject verify_cb);
+ /**
+ * Create a new object and store the Java object.
+ * @param verify_cb global reference to the Java object
+ */
+ ReposVerifyCallback(jobject jverify_cb);
+
~ReposVerifyCallback();
/**
* Implementation of the svn_repos_verify_callback_t API.
*
- * @param baton notification instance is passed using this parameter
- * @param notify all the information about the event
- * @param pool An APR pool from which to allocate memory.
+ * @param baton Notification instance is passed using this parameter
+ * @param revision The revision that the error was emitted for
+ * @param verify_err The emitted error
+ * @param scratch_pool An APR pool from which to allocate memory.
*/
static svn_error_t * callback(void *baton,
svn_revnum_t revision,
Modified:
subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ReposVerifyCallback.java
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ReposVerifyCallback.java?rev=1688395&r1=1688394&r2=1688395&view=diff
==============================================================================
---
subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ReposVerifyCallback.java
(original)
+++
subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ReposVerifyCallback.java
Tue Jun 30 08:26:59 2015
@@ -40,7 +40,7 @@ public interface ReposVerifyCallback ext
{
/**
* This callback method is invoked every time {@link ISVNRepos#verify}
- * encounters and error.
+ * encounters an error.
*<p>
* The implementation can either consume <code>verifyError</code>
* and return normally to continue verifying the repository after
Modified:
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNReposTests.java
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNReposTests.java?rev=1688395&r1=1688394&r2=1688395&view=diff
==============================================================================
---
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNReposTests.java
(original)
+++
subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNReposTests.java
Tue Jun 30 08:26:59 2015
@@ -114,19 +114,23 @@ public class SVNReposTests extends SVNTe
public void onVerifyError(long revision, ClientException verifyError)
throws ClientException
{
- if (revision == Revision.SVN_INVALID_REVNUM)
+ if (revision == Revision.SVN_INVALID_REVNUM) {
++mderr;
- else
+ }
+ else {
++reverr;
- if (keepGoing)
+ }
+ if (keepGoing) {
return;
- else
+ }
+ else {
throw verifyError;
+ }
}
}
- private boolean trytobreakrepo(OneTest test) throws IOException
+ private boolean tryToBreakRepo(OneTest test) throws IOException
{
File repo = test.getRepository();
@@ -139,7 +143,7 @@ public class SVNReposTests extends SVNTe
}
if (!rev1.exists() || !rev1.setWritable(true))
return false;
-
+
FileWriter fd = new FileWriter(rev1);
fd.write("inserting junk to corrupt the rev");
fd.close();
@@ -148,9 +152,9 @@ public class SVNReposTests extends SVNTe
public void testVerifyBrokenRepo() throws Throwable
{
- OneTest thisTest = new OneTest(false);
+ OneTest thisTest = new OneTest(false, true);
- if (!trytobreakrepo(thisTest)) {
+ if (!tryToBreakRepo(thisTest)) {
// We don't support the repos format
System.err.print("Cannot break repository for verify test.");
return;
@@ -176,9 +180,9 @@ public class SVNReposTests extends SVNTe
public void testVerifyBrokenRepo_KeepGoing() throws Throwable
{
- OneTest thisTest = new OneTest(false);
+ OneTest thisTest = new OneTest(false, true);
- if (!trytobreakrepo(thisTest)) {
+ if (!tryToBreakRepo(thisTest)) {
// We don't support the repos format
System.err.print("Cannot break repository for verify test.");
return;