subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1543325 - in /subversion/trunk/subversion/bindings/javahl: native/SVNClient.cpp src/org/apache/subversion/javahl/ISVNClient.java
Date Tue, 19 Nov 2013 07:19:47 GMT
Author: brane
Date: Tue Nov 19 07:19:46 2013
New Revision: 1543325

URL: http://svn.apache.org/r1543325
Log:
Fix thinko in handling empty copy source array in JavaHL.

[in subversion/bindings/javahl]
* src/org/apache/subversion/javahl/ISVNClient.java (ISVNClient.copy):
   Document that a NPE is thrown if the list of sources is empty.
* native/SVNClient.cpp (SVNClient::copy):
   Throw a NullPointerException instead of using an invalid error code.

Modified:
    subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.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=1543325&r1=1543324&r2=1543325&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/SVNClient.cpp Tue Nov 19 07:19:46 2013
@@ -449,12 +449,7 @@ void SVNClient::copy(CopySources &copySo
     SVN::Pool subPool(pool);
 
     apr_array_header_t *srcs = copySources.array(subPool);
-    if (srcs == NULL)
-    {
-        JNIUtil::throwNativeException(JAVA_PACKAGE "/ClientException",
-                                      "Invalid copy sources");
-        return;
-    }
+    SVN_JNI_NULL_PTR_EX(srcs, "sources", );
     SVN_JNI_NULL_PTR_EX(destPath, "destPath", );
     Path destinationPath(destPath, subPool);
     SVN_JNI_ERR(destinationPath.error_occurred(), );

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=1543325&r1=1543324&r2=1543325&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
Tue Nov 19 07:19:46 2013
@@ -314,6 +314,7 @@ public interface ISVNClient
      * @param handler   the commit message callback, may be <code>null</code>
      *                  if <code>destPath</code> is not a URL
      * @throws ClientException If the copy operation fails.
+     * @throws NullPointerException if the <code>sources</code> list is empty.
      */
     void copy(List<CopySource> sources, String destPath,
               boolean copyAsChild, boolean makeParents,



Mime
View raw message