subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markp...@apache.org
Subject svn commit: r1157416 - in /subversion/trunk/subversion/bindings/javahl: src/org/apache/subversion/javahl/JNIError.java src/org/tigris/subversion/javahl/JNIError.java tests/org/apache/subversion/javahl/BasicTests.java
Date Sat, 13 Aug 2011 20:03:25 GMT
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
      */



Mime
View raw message