Are there backward compat concerns here?
IOW, if this is a public class in the tigris package and folks could
conceivably be catching it, such catches would now fail, yes? (I'm
not familiar enough with the code or its use cases to know if this is
a valid concern or not.)
-Hyrum
On Sat, Aug 13, 2011 at 3:03 PM, <markphip_at_apache.org> wrote:
> Author: markphip
> Date: Sat Aug 13 20:03:25 2011
> New Revision: 1157416
>
> URL: http://svn.apache.org/viewvc?rev=1157416&view=rev
> Log:
> Move JNIError class from org.tigris to org.apache package. This
> resolves NoClassDefFoundException at runtime when native code tries
> to throw this error.
>
> [ subversion/bindings/javahl/ ]
> * tests/org/apache/subversion/javahl/BasicTests.java
> (testJNIError): New test to verify this error is thrown.
>
> * src/org/tigris/subversion/javahl/JNIError.java
> * src/org/apache/subversion/javahl/JNIError.java
> Moved class from tigris to apache package.
>
>
> Added:
> subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java
> - copied, changed from r1157410, subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java
> Removed:
> subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java
> Modified:
> subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
>
> Copied: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java (from r1157410, subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java)
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java?p2=subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java&p1=subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java&r1=1157410&r2=1157416&rev=1157416&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/JNIError.java (original)
> +++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIError.java Sat Aug 13 20:03:25 2011
> @@ -21,7 +21,7 @@
> * @endcopyright
> */
>
> -package org.tigris.subversion.javahl;
> +package org.apache.subversion.javahl;
>
> /**
> * This error is thrown by error in the native library.
>
> Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1157416&r1=1157415&r2=1157416&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
> +++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Sat Aug 13 20:03:25 2011
> @@ -130,6 +130,35 @@ public class BasicTests extends SVNTests
> }
>
> /**
> + * Test the JNIError class functionality
> + * @throws Throwable
> + */
> + public void testJNIError() throws Throwable
> + {
> + // build the test setup.
> + OneTest thisTest = new OneTest();
> +
> + // Create a client, dispose it, then try to use it later
> + ISVNClient tempclient = new SVNClient();
> + tempclient.dispose();
> +
> + // create Y and Y/Z directories in the repository
> + addExpectedCommitItem(null, thisTest.getUrl().toString(), "Y", NodeKind.none,
> + CommitItemStateFlags.Add);
> + Set<String> urls = new HashSet<String>(1);
> + urls.add(thisTest.getUrl() + "/Y");
> + try
> + {
> + tempclient.mkdir(urls, false, null, new ConstMsg("log_msg"), null);
> + }
> + catch(JNIError e)
> + {
> + return; // Test passes!
> + }
> + fail("A JNIError should have been thrown here.");
> + }
> +
> + /**
> * Tests Mergeinfo and RevisionRange classes.
> * @since 1.5
> */
>
>
>
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2011-08-14 03:25:04 CEST