subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r917714 - in /subversion/trunk/subversion/bindings/javahl: native/ src/org/apache/subversion/javahl/ src/org/tigris/subversion/javahl/
Date Mon, 01 Mar 2010 21:00:16 GMT
Author: hwright
Date: Mon Mar  1 21:00:15 2010
New Revision: 917714

URL: http://svn.apache.org/viewvc?rev=917714&view=rev
Log:
JavaHL: Convert another property-retrival API to return a byte[].

[ in subversion/bindings/javahl/ ]
* native/SVNClient.h,
  native/SVNClient.cpp
  (propertyGet): Return a byte array.

* native/org_apache_subversion_javahl_SVNClient.cpp
  (Java_org_apache_subversion_javahl_SVNClient_propertyGet): Same.

* src/org/tigris/subversion/javahl/SVNClient.java
  (propertyGet): Update the compat wrapper.

* src/org/apache/subversion/javahl/SVNClient.java
  (propertyGet): Return a byte[].

* src/org/apache/subversion/javahl/ISVNClient.java
  (propertyGet): Same.

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

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp?rev=917714&r1=917713&r2=917714&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Mon Mar  1 21:00:15 2010
@@ -889,9 +889,9 @@
 /**
  * Get a property.
  */
-jobject SVNClient::propertyGet(jobject jthis, const char *path,
-                               const char *name, Revision &revision,
-                               Revision &pegRevision)
+jbyteArray SVNClient::propertyGet(jobject jthis, const char *path,
+                                  const char *name, Revision &revision,
+                                  Revision &pegRevision)
 {
     SVN::Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
@@ -922,7 +922,8 @@
     if (propval == NULL)
         return NULL;
 
-    return CreateJ::Property(jthis, path, name, propval);
+    return JNIUtil::makeJByteArray((const signed char *)propval->data,
+                                   propval->len);
 }
 
 void SVNClient::properties(const char *path, Revision &revision,

Modified: subversion/trunk/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/SVNClient.h?rev=917714&r1=917713&r2=917714&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.h Mon Mar  1 21:00:15 2010
@@ -183,8 +183,8 @@
   jstring getVersionInfo(const char *path, const char *trailUrl,
                          bool lastChanged);
   void upgrade(const char *path);
-  jobject propertyGet(jobject jthis, const char *path, const char *name,
-                      Revision &revision, Revision &pegRevision);
+  jbyteArray propertyGet(jobject jthis, const char *path, const char *name,
+                         Revision &revision, Revision &pegRevision);
   void diff(const char *target1, Revision &revision1,
             const char *target2, Revision &revision2,
             const char *relativeToDir, const char *outfileName,

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=917714&r1=917713&r2=917714&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
Mon Mar  1 21:00:15 2010
@@ -1104,7 +1104,7 @@
                      jforce ? true: false);
 }
 
-JNIEXPORT jobject JNICALL
+JNIEXPORT jbyteArray JNICALL
 Java_org_apache_subversion_javahl_SVNClient_propertyGet
 (JNIEnv *env, jobject jthis, jstring jpath, jstring jname, jobject jrevision,
  jobject jpegRevision)

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=917714&r1=917713&r2=917714&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
Mon Mar  1 21:00:15 2010
@@ -759,8 +759,8 @@
      * @throws ClientException
      * @since 1.2
      */
-    PropertyData propertyGet(String path, String name, Revision revision,
-                             Revision pegRevision)
+    byte[] propertyGet(String path, String name, Revision revision,
+                       Revision pegRevision)
             throws ClientException;
 
     /**

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=917714&r1=917713&r2=917714&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
Mon Mar  1 21:00:15 2010
@@ -667,9 +667,8 @@
     /**
      * @since 1.2
      */
-    public native PropertyData propertyGet(String path, String name,
-                                           Revision revision,
-                                           Revision pegRevision)
+    public native byte[] propertyGet(String path, String name,
+                                     Revision revision, Revision pegRevision)
             throws ClientException;
 
     /**

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java?rev=917714&r1=917713&r2=917714&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
Mon Mar  1 21:00:15 2010
@@ -1999,9 +1999,10 @@
     {
         try
         {
-            return new PropertyData(aSVNClient.propertyGet(path, name,
+            return new PropertyData(path, name,
+                    new String(aSVNClient.propertyGet(path, name,
                         revision == null ? null : revision.toApache(),
-                        pegRevision == null ? null : pegRevision.toApache()));
+                        pegRevision == null ? null : pegRevision.toApache())));
         }
         catch (org.apache.subversion.javahl.ClientException ex)
         {



Mime
View raw message