subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r921128 - in /subversion/trunk/subversion/bindings/javahl: native/org_apache_subversion_javahl_SVNClient.cpp src/org/apache/subversion/javahl/SVNClient.java
Date Tue, 09 Mar 2010 21:10:12 GMT
Author: hwright
Date: Tue Mar  9 21:10:12 2010
New Revision: 921128

URL: http://svn.apache.org/viewvc?rev=921128&view=rev
Log:
JavaHL: Pass path Sets directly to the native library, and remove any
temporary intermediate wrappers for same.

[ in subversion/bindings/javahl/ ]
* native/org_apache_subversion_javahl_SVNClient.cpp
  (Java_org_apache_subversion_javahl_SVNClient_remove,
   Java_org_apache_subversion_javahl_SVNClient_update,
   Java_org_apache_subversion_javahl_SVNClient_commit,
   Java_org_apache_subversion_javahl_SVNClient_move,
   Java_org_apache_subversion_javahl_SVNClient_mkdir,
   Java_org_apache_subversion_javahl_SVNClient_addToChangelist,
   Java_org_apache_subversion_javahl_SVNClient_removeFromChangelists,
   Java_org_apache_subversion_javahl_SVNClient_lock,
   Java_org_apache_subversion_javahl_SVNClient_unlock):
    Change the jtarget params to jobjects from jobjectArrays.

* src/org/apache/subversion/javahl/SVNClient.java
  (remove, update, commit, move, mkdir, addToChangelist, lock, unlock,
   removeFromChangelists): Update the native version of these methods, and
    remove wrappers as required.

Modified:
    subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java

Modified: subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=921128&r1=921127&r2=921128&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
Tue Mar  9 21:10:12 2010
@@ -445,7 +445,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_remove
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jmessage,
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jmessage,
  jboolean jforce, jboolean keepLocal, jobject jrevpropTable)
 {
   JNIEntry(SVNClient, remove);
@@ -514,7 +514,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT jlongArray JNICALL
 Java_org_apache_subversion_javahl_SVNClient_update
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jobject jrevision,
+(JNIEnv *env, jobject jthis, jobject jtargets, jobject jrevision,
  jint jdepth, jboolean jdepthIsSticky, jboolean jignoreExternals,
  jboolean jallowUnverObstructions)
 {
@@ -542,9 +542,9 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT jlong JNICALL
 Java_org_apache_subversion_javahl_SVNClient_commit
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jmessage,
- jint jdepth, jboolean jnoUnlock, jboolean jkeepChangelist,
- jobject jchangelists, jobject jrevpropTable)
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jmessage, jint jdepth,
+ jboolean jnoUnlock, jboolean jkeepChangelist, jobject jchangelists,
+ jobject jrevpropTable)
 {
   JNIEntry(SVNClient, commit);
   SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -608,7 +608,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_move
-(JNIEnv *env, jobject jthis, jobjectArray jsrcPaths, jstring jdestPath,
+(JNIEnv *env, jobject jthis, jobject jsrcPaths, jstring jdestPath,
  jstring jmessage, jboolean jforce, jboolean jmoveAsChild,
  jboolean jmakeParents, jobject jrevpropTable)
 {
@@ -642,7 +642,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_mkdir
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jmessage,
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jmessage,
  jboolean jmakeParents, jobject jrevpropTable)
 {
   JNIEntry(SVNClient, mkdir);
@@ -1665,7 +1665,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_addToChangelist
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jchangelist,
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jchangelist,
  jint jdepth, jobject jchangelists)
 {
   JNIEntry(SVNClient, addToChangelist);
@@ -1694,7 +1694,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_removeFromChangelists
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jint jdepth,
+(JNIEnv *env, jobject jthis, jobject jtargets, jint jdepth,
  jobject jchangelists)
 {
   JNIEntry(SVNClient, removeFromChangelist);
@@ -1743,7 +1743,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_lock
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jstring jcomment,
+(JNIEnv *env, jobject jthis, jobject jtargets, jstring jcomment,
  jboolean jforce)
 {
   JNIEntry(SVNClient, lock);
@@ -1767,7 +1767,7 @@ Java_org_apache_subversion_javahl_SVNCli
 
 JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNClient_unlock
-(JNIEnv *env, jobject jthis, jobjectArray jtargets, jboolean jforce)
+(JNIEnv *env, jobject jthis, jobject jtargets, jboolean jforce)
 {
   JNIEntry(SVNClient, unlock);
   SVNClient *cl = SVNClient::getCppObject(jthis);

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=921128&r1=921127&r2=921128&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
Tue Mar  9 21:10:12 2010
@@ -223,17 +223,9 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.5
      */
-    public void remove(Set<String> paths, String message, boolean force,
-                       boolean keepLocal, Map<String, String> revpropTable)
-            throws ClientException
-    {
-        this.remove(paths.toArray(new String[paths.size()]), message, force,
-                    keepLocal, revpropTable);
-    }
-
-    private native void remove(String[] paths, String message, boolean force,
-                               boolean keepLocal,
-                               Map<String, String> revpropTable)
+    public native void remove(Set<String> paths, String message, boolean force,
+                              boolean keepLocal,
+                              Map<String, String> revpropTable)
             throws ClientException;
 
     /**
@@ -253,40 +245,19 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.5
      */
-    public long[] update(Set<String> paths, Revision revision,
-                         int depth, boolean depthIsSticky,
-                         boolean ignoreExternals,
-                         boolean allowUnverObstructions)
-            throws ClientException
-    {
-        return update(paths.toArray(new String[paths.size()]), revision, depth,
-                      depthIsSticky, ignoreExternals, allowUnverObstructions);
-    }
-
-    private native long[] update(String[] paths, Revision revision,
-                                 int depth, boolean depthIsSticky,
-                                 boolean ignoreExternals,
-                                 boolean allowUnverObstructions)
+    public native long[] update(Set<String> paths, Revision revision,
+                                int depth, boolean depthIsSticky,
+                                boolean ignoreExternals,
+                                boolean allowUnverObstructions)
             throws ClientException;
 
     /**
      * @since 1.5
      */
-    public long commit(Set<String> paths, String message, int depth,
-                       boolean noUnlock, boolean keepChangelist,
-                       Collection<String> changelists,
-                       Map<String, String> revpropTable)
-            throws ClientException
-    {
-        return this.commit(paths.toArray(new String[paths.size()]),
-                    message, depth, noUnlock, keepChangelist,
-                    changelists, revpropTable);
-    }
-
-    private native long commit(String[] paths, String message, int depth,
-                               boolean noUnlock, boolean keepChangelist,
-                               Collection<String> changelists,
-                               Map<String, String> revpropTable)
+    public native long commit(Set<String> paths, String message, int depth,
+                              boolean noUnlock, boolean keepChangelist,
+                              Collection<String> changelists,
+                              Map<String, String> revpropTable)
             throws ClientException;
 
     /**
@@ -312,35 +283,16 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.5
      */
-    public void move(Set<String> srcPaths, String destPath,
-                     String message, boolean force, boolean moveAsChild,
-                     boolean makeParents, Map<String, String> revpropTable)
-            throws ClientException
-    {
-        this.move(srcPaths.toArray(new String[srcPaths.size()]), destPath,
-                  message, force, moveAsChild, makeParents, revpropTable);
-    }
-
-    private native void move(String[] srcPaths, String destPath,
-                             String message,
-                             boolean force, boolean moveAsChild,
-                             boolean makeParents,
-                             Map<String, String> revpropTable)
+    public native void move(Set<String> srcPaths, String destPath,
+                            String message, boolean force, boolean moveAsChild,
+                            boolean makeParents,
+                            Map<String, String> revpropTable)
             throws ClientException;
 
     /**
      * @since 1.5
      */
-    public void mkdir(Set<String> paths, String message,
-                      boolean makeParents,
-                      Map<String, String> revpropTable)
-            throws ClientException
-    {
-        this.mkdir(paths.toArray(new String[paths.size()]), message,
-                   makeParents, revpropTable);
-    }
-
-    private native void mkdir(String[] paths, String message,
+    public native void mkdir(Set<String> paths, String message,
                              boolean makeParents,
                              Map<String, String> revpropTable)
             throws ClientException;
@@ -635,32 +587,16 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.5
      */
-    public void addToChangelist(Set<String> paths, String changelist,
-                                int depth, Collection<String> changelists)
-            throws ClientException
-    {
-        this.addToChangelist(paths.toArray(new String[paths.size()]),
-                             changelist, depth, changelists);
-    }
-
-    private native void addToChangelist(String[] paths, String changelist,
-                                        int depth,
-                                        Collection<String> changelists)
+    public native void addToChangelist(Set<String> paths, String changelist,
+                                       int depth,
+                                       Collection<String> changelists)
             throws ClientException;
 
     /**
      * @since 1.5
      */
-    public void removeFromChangelists(Set<String> paths, int depth,
-                                      Collection<String> changelists)
-            throws ClientException
-    {
-        this.removeFromChangelists(paths.toArray(new String[paths.size()]),
-                                   depth, changelists);
-    }
-
-    private native void removeFromChangelists(String[] paths, int depth,
-                                              Collection<String> changelists)
+    public native void removeFromChangelists(Set<String> paths, int depth,
+                                             Collection<String> changelists)
             throws ClientException;
 
     /**
@@ -731,25 +667,13 @@ public class SVNClient implements ISVNCl
     /**
      * @since 1.2
      */
-    public void lock(Set<String> paths, String comment, boolean force)
-            throws ClientException
-    {
-        this.lock(paths.toArray(new String[paths.size()]), comment, force);
-    }
-
-    private native void lock(String[] paths, String comment, boolean force)
+    public native void lock(Set<String> paths, String comment, boolean force)
             throws ClientException;
 
     /**
      * @since 1.2
      */
-    public void unlock(Set<String> paths, boolean force)
-            throws ClientException
-    {
-        this.unlock(paths.toArray(new String[paths.size()]), force);
-    }
-
-    private native void unlock(String[] paths, boolean force)
+    public native void unlock(Set<String> paths, boolean force)
             throws ClientException;
 
     /**



Mime
View raw message