Index: subversion/bindings/javahl/native/Pool.h
===================================================================
--- subversion/bindings/javahl/native/Pool.h	(revision 24532)
+++ subversion/bindings/javahl/native/Pool.h	(working copy)
@@ -38,12 +38,15 @@
 public:
     Pool();
     ~Pool();
-    apr_pool_t *pool() const;
+
+    operator apr_pool_t * () const;
+
+    void clear();
 private:
     /**
      * the apr pool request pool
      */
-    apr_pool_t *m_pool;
+    apr_pool_t *pool;
 
 };
 // !defined(AFX_POOL_H__4755FB06_B88C_451D_A0EE_91F5A547C30B__INCLUDED_)
Index: subversion/bindings/javahl/native/SVNAdmin.cpp
===================================================================
--- subversion/bindings/javahl/native/SVNAdmin.cpp	(revision 24532)
+++ subversion/bindings/javahl/native/SVNAdmin.cpp	(working copy)
@@ -63,12 +63,12 @@
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     if (configPath != NULL)
-        configPath = svn_path_internal_style(configPath, requestPool.pool());
+        configPath = svn_path_internal_style(configPath, requestPool);
     svn_repos_t *repos;
     apr_hash_t *config;
-    apr_hash_t *fs_config = apr_hash_make (requestPool.pool());;
+    apr_hash_t *fs_config = apr_hash_make (requestPool);;
 
     apr_hash_set (fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
                   APR_HASH_KEY_STRING,
@@ -81,26 +81,26 @@
                   APR_HASH_KEY_STRING,
                   fstype);
 
-    SVN_JNI_ERR(svn_config_get_config(&config, configPath, requestPool.pool()),
+    SVN_JNI_ERR(svn_config_get_config(&config, configPath, requestPool),
                 );
     SVN_JNI_ERR(svn_repos_create(&repos, path, NULL, NULL,
-                                 config, fs_config, requestPool.pool()), );
+                                 config, fs_config, requestPool), );
 }
 
 void SVNAdmin::deltify(const char *path, Revision &revStart, Revision &revEnd)
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     svn_repos_t *repos;
     svn_fs_t *fs;
     svn_revnum_t start = SVN_INVALID_REVNUM, end = SVN_INVALID_REVNUM;
     svn_revnum_t youngest, revision;
-    apr_pool_t *revisionPool = svn_pool_create (requestPool.pool());
+    apr_pool_t *revisionPool = svn_pool_create(requestPool);
 
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), );
     fs = svn_repos_fs (repos);
-    SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool.pool()), );
+    SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool), );
 
     if (revStart.revision()->kind == svn_opt_revision_number)
     /* ### We only handle revision numbers right now, not dates. */
@@ -141,10 +141,9 @@
        predecessor deltification on paths changed in each. */
     for (revision = start; revision <= end; revision++)
     {
-        svn_pool_clear (revisionPool);
+        svn_pool_clear(revisionPool);
         SVN_JNI_ERR(svn_fs_deltify_revision (fs, revision, revisionPool), );
     }
-    svn_pool_destroy (revisionPool);
 
     return;
 }
@@ -155,15 +154,15 @@
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     svn_repos_t *repos;
     svn_fs_t *fs;
     svn_revnum_t lower = SVN_INVALID_REVNUM, upper = SVN_INVALID_REVNUM;
     svn_revnum_t youngest;
 
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), );
     fs = svn_repos_fs (repos);
-    SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool.pool()), );
+    SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool), );
 
     /* ### We only handle revision numbers right now, not dates. */
     if (revsionStart.revision()->kind == svn_opt_revision_number)
@@ -208,7 +207,7 @@
     SVN_JNI_ERR(svn_repos_dump_fs(repos, dataOut.getStream(requestPool),
                                   messageOut.getStream(requestPool),
                                   lower, upper, incremental,
-                                  NULL, NULL, requestPool.pool()), );
+                                  NULL, NULL, requestPool), );
 }
 
 void SVNAdmin::hotcopy(const char *path, const char *targetPath,
@@ -217,10 +216,10 @@
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(targetPath, "targetPath", );
-    path = svn_path_internal_style(path, requestPool.pool());
-    targetPath = svn_path_internal_style(targetPath, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
+    targetPath = svn_path_internal_style(targetPath, requestPool);
     SVN_JNI_ERR(svn_repos_hotcopy(path, targetPath, cleanLogs,
-                                  requestPool.pool()), );
+                                  requestPool), );
 }
 
 static void
@@ -228,11 +227,11 @@
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     apr_array_header_t *logfiles;
     int i;
     SVN_JNI_ERR(svn_repos_db_logfiles(&logfiles, path, only_unused,
-                                      requestPool.pool()), );
+                                      requestPool), );
 
     /* Loop, printing log files.  We append the log paths to the
        repository path, making sure to return everything to the native
@@ -242,8 +241,8 @@
         const char *log_utf8;
         log_utf8 = svn_path_join (path,
                                   APR_ARRAY_IDX (logfiles, i, const char *),
-                                  requestPool.pool());
-        log_utf8 = svn_path_local_style (log_utf8, requestPool.pool());
+                                  requestPool);
+        log_utf8 = svn_path_local_style (log_utf8, requestPool);
         receiver.receiveMessage(log_utf8);
     }
 }
@@ -262,34 +261,34 @@
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     svn_repos_t *repos;
     enum svn_repos_load_uuid uuid_action = svn_repos_load_uuid_default;
     if (ignoreUUID)
         uuid_action = svn_repos_load_uuid_ignore;
     else if (forceUUID)
         uuid_action = svn_repos_load_uuid_force;
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), );
 
     SVN_JNI_ERR(svn_repos_load_fs(repos, dataIn.getStream(requestPool),
                                   messageOut.getStream(requestPool),
                                   uuid_action, relativePath,
-                                  NULL, NULL, requestPool.pool()), );
+                                  NULL, NULL, requestPool), );
 }
 
 void SVNAdmin::lstxns(const char *path, MessageReceiver &messageReceiver)
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     svn_repos_t *repos;
     svn_fs_t *fs;
     apr_array_header_t *txns;
     int i;
 
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), );
     fs = svn_repos_fs (repos);
-    SVN_JNI_ERR(svn_fs_list_transactions(&txns, fs, requestPool.pool()), );
+    SVN_JNI_ERR(svn_fs_list_transactions(&txns, fs, requestPool), );
 
     /* Loop, printing revisions. */
     for (i = 0; i < txns->nelts; i++)
@@ -304,20 +303,20 @@
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", -1);
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     svn_revnum_t youngest_rev;
     svn_repos_t *repos;
 
     SVN_JNI_ERR(svn_repos_recover2(path, FALSE, NULL, NULL,
-                                   requestPool.pool()),
+                                   requestPool),
                 -1);
 
     /* Since db transactions may have been replayed, it's nice to tell
        people what the latest revision is.  It also proves that the
        recovery actually worked. */
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), -1);
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), -1);
     SVN_JNI_ERR(svn_fs_youngest_rev(&youngest_rev, svn_repos_fs (repos),
-                                    requestPool.pool()),
+                                    requestPool),
                 -1);
     return youngest_rev;
 }
@@ -326,15 +325,15 @@
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     svn_repos_t *repos;
     svn_fs_t *fs;
     svn_fs_txn_t *txn;
     const apr_array_header_t *args;
     int i;
-    apr_pool_t *transactionPool = svn_pool_create (requestPool.pool());
+    apr_pool_t *transactionPool = svn_pool_create(requestPool);
 
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), );
     fs = svn_repos_fs (repos);
 
     args = transactions.array(requestPool);
@@ -363,7 +362,7 @@
            that error and just report to the user that we had an issue
            with this particular txn. */
         SVN_JNI_ERR(err, );
-        svn_pool_clear (transactionPool);
+        svn_pool_clear(transactionPool);
     }
 
 }
@@ -385,26 +384,26 @@
 
     /* Open the filesystem  */
     svn_repos_t *repos;
-    path = svn_path_internal_style(path, requestPool.pool());
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+    path = svn_path_internal_style(path, requestPool);
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), );
 
     /* If we are bypassing the hooks system, we just hit the filesystem
        directly. */
     svn_error_t *err;
-    svn_string_t *propValStr = svn_string_create(propValue, requestPool.pool());
+    svn_string_t *propValStr = svn_string_create(propValue, requestPool);
     if (usePreRevPropChangeHook || usePostRevPropChangeHook)
     {
         err = svn_repos_fs_change_rev_prop3
             (repos, revision.revision()->value.number, NULL,
              propName, propValStr, usePreRevPropChangeHook,
-             usePostRevPropChangeHook, NULL, NULL, requestPool.pool());
+             usePostRevPropChangeHook, NULL, NULL, requestPool);
     }
     else
     {
         svn_fs_t *fs = svn_repos_fs (repos);
         err = svn_fs_change_rev_prop
             (fs, revision.revision()->value.number,
-             propName, propValStr, requestPool.pool());
+             propName, propValStr, requestPool);
     }
     SVN_JNI_ERR(err, );
 }
@@ -414,35 +413,35 @@
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     svn_repos_t *repos;
     svn_revnum_t youngest;
 
     /* This whole process is basically just a dump of the repository
        with no interest in the output. */
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), );
     SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, svn_repos_fs (repos),
-                                    requestPool.pool()), );
+                                    requestPool), );
     SVN_JNI_ERR(svn_repos_dump_fs(repos, NULL, messageOut.getStream(requestPool),
                                   0, youngest, FALSE, NULL, NULL,
-                                  requestPool.pool()), );
+                                  requestPool), );
 }
 
 jobjectArray SVNAdmin::lslocks(const char *path)
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     svn_repos_t *repos;
     svn_fs_t *fs;
     apr_hash_t *locks;
     apr_hash_index_t *hi;
 
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), NULL);
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), NULL);
     fs = svn_repos_fs (repos);
     /* Fetch all locks on or below the root directory. */
     SVN_JNI_ERR(svn_repos_fs_get_locks(&locks, repos, "/", NULL, NULL,
-                                       requestPool.pool()),
+                                       requestPool),
                 NULL);
 
     int count = apr_hash_count (locks);
@@ -461,7 +460,7 @@
         return NULL;
 
     int i = 0;
-    for (hi = apr_hash_first (requestPool.pool(), locks); hi;
+    for (hi = apr_hash_first (requestPool, locks); hi;
             hi = apr_hash_next (hi),i++)
     {
         void *val;
@@ -483,14 +482,13 @@
 void SVNAdmin::rmlocks(const char *path, Targets &locks)
 {
     Pool requestPool;
-    apr_pool_t *pool = requestPool.pool();
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    path = svn_path_internal_style(path, requestPool.pool());
+    path = svn_path_internal_style(path, requestPool);
     svn_repos_t *repos;
     svn_fs_t *fs;
     svn_fs_access_t *access;
 
-    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool.pool()), );
+    SVN_JNI_ERR(svn_repos_open(&repos, path, requestPool), );
     fs = svn_repos_fs (repos);
     const char *username;
 
@@ -500,10 +498,10 @@
         apr_uid_t uid;
         apr_gid_t gid;
         char *un;
-        if (apr_uid_current (&uid, &gid, pool) == APR_SUCCESS &&
-            apr_uid_name_get (&un, uid, pool) == APR_SUCCESS)
+        if (apr_uid_current (&uid, &gid, requestPool) == APR_SUCCESS &&
+            apr_uid_name_get (&un, uid, requestPool) == APR_SUCCESS)
         {
-            svn_error_t *err = svn_utf_cstring_to_utf8(&username, un, pool);
+            svn_error_t *err = svn_utf_cstring_to_utf8(&username, un, requestPool);
             svn_error_clear (err);
             if (err)
                 username = "administrator";
@@ -511,12 +509,12 @@
     }
 
     /* Create an access context describing the current user. */
-    SVN_JNI_ERR(svn_fs_create_access(&access, username, pool), );
+    SVN_JNI_ERR(svn_fs_create_access(&access, username, requestPool), );
 
     /* Attach the access context to the filesystem. */
     SVN_JNI_ERR(svn_fs_set_access(fs, access), );
 
-    apr_pool_t *subpool = svn_pool_create (pool);
+    apr_pool_t *subpool = svn_pool_create(requestPool);
     const apr_array_header_t *args = locks.array(requestPool);
     for (int i = 0; i < args->nelts; i++)
     {
Index: subversion/bindings/javahl/native/Pool.cpp
===================================================================
--- subversion/bindings/javahl/native/Pool.cpp	(revision 24532)
+++ subversion/bindings/javahl/native/Pool.cpp	(working copy)
@@ -32,7 +32,7 @@
 Pool::Pool()
 {
     JNICriticalSection criticalSection(*JNIUtil::getGlobalPoolMutex());
-    m_pool = svn_pool_create(JNIUtil::getPool());
+    pool = svn_pool_create(JNIUtil::getPool());
     JNIUtil::setRequestPool(this);
 }
 
@@ -43,17 +43,25 @@
 {
     JNICriticalSection criticalSection(*JNIUtil::getGlobalPoolMutex());
     JNIUtil::setRequestPool(NULL);
-    if (m_pool)
+    if (pool)
     {
-        svn_pool_destroy (m_pool);
+        svn_pool_destroy (pool);
     }
 
 }
+
 /**
  * Returns the apr pool.
- * @return the apr pool
  */
-apr_pool_t *Pool::pool () const
+Pool::operator apr_pool_t * () const
 {
-    return m_pool;
+    return pool;
 }
+
+/**
+ * Clear the pool
+ */
+void Pool::clear()
+{
+    svn_pool_clear(pool);
+}
Index: subversion/bindings/javahl/native/CopySources.cpp
===================================================================
--- subversion/bindings/javahl/native/CopySources.cpp	(revision 24532)
+++ subversion/bindings/javahl/native/CopySources.cpp	(working copy)
@@ -74,9 +74,8 @@
 apr_array_header_t *
 CopySources::array(Pool &pool)
 {
-    apr_pool_t *p = pool.pool();
     if (m_copySources == NULL)
-        return apr_array_make(p, 0, sizeof(svn_client_copy_source_t *));
+        return apr_array_make(pool, 0, sizeof(svn_client_copy_source_t *));
 
     JNIEnv *env = JNIUtil::getEnv();
     jint nbrSources = env->GetArrayLength(m_copySources);
@@ -87,7 +86,7 @@
         return NULL;
 
     apr_array_header_t *copySources =
-        apr_array_make(p, nbrSources, sizeof(svn_client_copy_source_t *));
+        apr_array_make(pool, nbrSources, sizeof(svn_client_copy_source_t *));
     for (int i = 0; i < nbrSources; i++)
     {
         jobject copySource = env->GetObjectArrayElement(m_copySources, i);
@@ -96,7 +95,7 @@
         if (env->IsInstanceOf(copySource, clazz))
         {
             svn_client_copy_source_t *src =
-                (svn_client_copy_source_t *) apr_palloc(p, sizeof(*src));
+                (svn_client_copy_source_t *) apr_palloc(pool, sizeof(*src));
 
             // Extract the path or URL from the copy source.
             static jmethodID getPath = 0;
@@ -112,7 +111,7 @@
             JNIStringHolder path(jpath);
             if (JNIUtil::isJavaExceptionThrown())
                 return NULL;
-            src->path = apr_pstrdup(p, (const char *) path);
+            src->path = apr_pstrdup(pool, (const char *) path);
             env->DeleteLocalRef(jpath);
 
             // Extract source revision from the copy source.
@@ -128,7 +127,7 @@
             // TODO: Default this to svn_opt_revision_undefined (or HEAD)
             Revision rev(jrev);
             src->revision = (const svn_opt_revision_t *)
-                apr_palloc(p, sizeof(*src->revision));
+                apr_palloc(pool, sizeof(*src->revision));
             memcpy((void *) src->revision, rev.revision(),
                    sizeof(*src->revision));
             env->DeleteLocalRef(jrev);
@@ -146,7 +145,7 @@
                                                     getPegRevision);
             Revision pegRev(jPegRev, true);
             src->peg_revision = (const svn_opt_revision_t *)
-                apr_palloc(p, sizeof(*src->peg_revision));
+                apr_palloc(pool, sizeof(*src->peg_revision));
             memcpy((void *) src->peg_revision, pegRev.revision(),
                    sizeof(*src->peg_revision));
             env->DeleteLocalRef(jPegRev);
Index: subversion/bindings/javahl/native/Outputer.cpp
===================================================================
--- subversion/bindings/javahl/native/Outputer.cpp	(revision 24532)
+++ subversion/bindings/javahl/native/Outputer.cpp	(working copy)
@@ -52,7 +52,7 @@
 {
     // create a stream with this as the baton and set the write and close
     // functions
-    svn_stream_t *ret = svn_stream_create(this, pool.pool());
+    svn_stream_t *ret = svn_stream_create(this, pool);
     svn_stream_set_write(ret, Outputer::write);
     svn_stream_set_close(ret, Outputer::close);
     return ret;
Index: subversion/bindings/javahl/native/Path.cpp
===================================================================
--- subversion/bindings/javahl/native/Path.cpp	(revision 24532)
+++ subversion/bindings/javahl/native/Path.cpp	(working copy)
@@ -74,7 +74,7 @@
     else
     {
         m_error_occured = JNIUtil::preprocessPath(pi_path,
-            JNIUtil::getRequestPool()->pool() );
+            *JNIUtil::getRequestPool());
 
         m_path = pi_path;
     }
@@ -121,7 +121,7 @@
     }
 
     Pool requestPool;
-    svn_error_t *err = svn_path_check_valid(p, requestPool.pool());
+    svn_error_t *err = svn_path_check_valid(p, requestPool);
     if (err == SVN_NO_ERROR)
     {
         return JNI_TRUE;
Index: subversion/bindings/javahl/native/SVNClient.cpp
===================================================================
--- subversion/bindings/javahl/native/SVNClient.cpp	(revision 24532)
+++ subversion/bindings/javahl/native/SVNClient.cpp	(working copy)
@@ -98,7 +98,7 @@
 jstring SVNClient::getAdminDirectoryName()
 {
     Pool requestPool;
-    jstring name = JNIUtil::makeJString(svn_wc_get_adm_dir(requestPool.pool()));
+    jstring name = JNIUtil::makeJString(svn_wc_get_adm_dir(requestPool));
     if (JNIUtil::isJavaExceptionThrown())
         return NULL;
 
@@ -108,7 +108,7 @@
 jboolean SVNClient::isAdminDirectory(const char *name)
 {
     Pool requestPool;
-    return svn_wc_is_adm_dir(name, requestPool.pool()) ? JNI_TRUE : JNI_FALSE;
+    return svn_wc_is_adm_dir(name, requestPool) ? JNI_TRUE : JNI_FALSE;
 }
 
 const char *SVNClient::getLastPath()
@@ -136,12 +136,12 @@
     SVN_JNI_ERR(svn_client_ls3(&dirents, NULL, urlPath.c_str(),
                                pegRevision.revision(),
                                revision.revision (),
-                               recurse, ctx, requestPool.pool()),
+                               recurse, ctx, requestPool),
                 NULL);
 
     apr_array_header_t *array =
            svn_sort__hash(dirents, svn_sort_compare_items_as_paths,
-                          requestPool.pool());
+                          requestPool);
 
     // create the array of DirEntry
     JNIEnv *env = JNIUtil::getEnv();
@@ -204,7 +204,7 @@
                                    depth,
                                    getAll, onServer, noIgnore,
                                    ignoreExternals,
-                                   ctx, requestPool.pool()), );
+                                   ctx, requestPool), );
 }
 
 void SVNClient::username(const char *pi_username)
@@ -248,7 +248,7 @@
                                 discoverPaths,
                                 stopOnCopy,
                                 LogMessageCallback::callback, callback, ctx,
-                                requestPool.pool()), );
+                                requestPool), );
 }
 
 jlong SVNClient::checkout(const char *moduleName, const char *destPath,
@@ -279,7 +279,7 @@
                                      ignoreExternals,
                                      allowUnverObstructions,
                                      ctx,
-                                     requestPool.pool()),
+                                     requestPool),
                 -1);
 
     return retval;
@@ -317,7 +317,7 @@
     SVN_JNI_ERR(targets.error_occured(), );
 
     SVN_JNI_ERR(svn_client_delete3(&commit_info, targets2, force, keep_local,
-                                   ctx, requestPool.pool()), );
+                                   ctx, requestPool), );
 }
 
 void SVNClient::revert(const char *path, bool recurse)
@@ -333,7 +333,7 @@
     Targets target (path);
     const apr_array_header_t *targets = target.array(requestPool);
     SVN_JNI_ERR(target.error_occured(), );
-    SVN_JNI_ERR(svn_client_revert(targets, recurse, ctx, requestPool.pool()), );
+    SVN_JNI_ERR(svn_client_revert(targets, recurse, ctx, requestPool), );
 }
 
 void SVNClient::add(const char *path, bool recurse, bool force)
@@ -349,7 +349,7 @@
         return;
 
     SVN_JNI_ERR(svn_client_add3(intPath.c_str (), recurse, force, FALSE,
-                                ctx, requestPool.pool()), );
+                                ctx, requestPool), );
 }
 
 jlongArray SVNClient::update(Targets &targets, Revision &revision,
@@ -370,7 +370,7 @@
                                    depth,
                                    ignoreExternals,
                                    allowUnverObstructions,
-                                   ctx, requestPool.pool()),
+                                   ctx, requestPool),
                 NULL);
 
     JNIEnv *env = JNIUtil::getEnv();
@@ -405,7 +405,7 @@
 
     SVN_JNI_ERR(svn_client_commit4(&commit_info, targets2, recurse,
                                    noUnlock, keepChangelist, changelistName,
-                                   ctx, requestPool.pool()),
+                                   ctx, requestPool),
                 SVN_INVALID_REVNUM);
 
     if (commit_info && SVN_IS_VALID_REVNUM(commit_info->revision))
@@ -436,7 +436,7 @@
 
     svn_commit_info_t *commit_info;
     SVN_JNI_ERR(svn_client_copy4(&commit_info, srcs, destinationPath.c_str(),
-                                 copyAsChild, ctx, requestPool.pool()), );
+                                 copyAsChild, ctx, requestPool), );
 }
 
 void SVNClient::move(Targets &srcPaths, const char *destPath,
@@ -457,7 +457,7 @@
     svn_commit_info_t *commit_info;
     SVN_JNI_ERR(svn_client_move5(&commit_info, (apr_array_header_t *) srcs,
                                  destinationPath.c_str(), force, moveAsChild,
-                                 ctx, requestPool.pool()), );
+                                 ctx, requestPool), );
 }
 
 void SVNClient::mkdir(Targets &targets, const char *message)
@@ -472,7 +472,7 @@
     SVN_JNI_ERR(targets.error_occured(), );
 
     SVN_JNI_ERR(svn_client_mkdir(&commit_info, targets2, ctx,
-                                 requestPool.pool()), );
+                                 requestPool), );
 }
 
 void SVNClient::cleanup(const char *path)
@@ -486,7 +486,7 @@
     if (ctx == NULL)
         return;
 
-    SVN_JNI_ERR(svn_client_cleanup (intPath.c_str (), ctx, requestPool.pool()),
+    SVN_JNI_ERR(svn_client_cleanup (intPath.c_str (), ctx, requestPool),
                 );
 }
 
@@ -501,7 +501,7 @@
         return;
 
     SVN_JNI_ERR(svn_client_resolved(intPath.c_str(), recurse,
-                                    ctx, requestPool.pool()), );
+                                    ctx, requestPool), );
 }
 
 jlong SVNClient::doExport(const char *srcPath, const char *destPath,
@@ -528,7 +528,7 @@
                                    ignoreExternals,
                                    depth,
                                    nativeEOL, ctx,
-                                   requestPool.pool()),
+                                   requestPool),
                 -1);
 
     return retval;
@@ -558,7 +558,7 @@
                                    depth,
                                    allowUnverObstructions,
                                    ctx,
-                                   requestPool.pool()),
+                                   requestPool),
                 -1);
 
     return retval;
@@ -581,7 +581,7 @@
         return;
 
     SVN_JNI_ERR(svn_client_import(&commit_info, intPath.c_str(), intUrl.c_str(),
-                                  !recurse, ctx, requestPool.pool()), );
+                                  !recurse, ctx, requestPool), );
 }
 
 void SVNClient::merge(const char *path1, Revision &revision1,
@@ -611,7 +611,7 @@
                                   intLocalPath.c_str(),
                                   depth,
                                   ignoreAncestry, force, FALSE, dryRun, NULL,
-                                  ctx, requestPool.pool()), );
+                                  ctx, requestPool), );
 }
 
 void SVNClient::merge(const char *path, Revision &pegRevision,
@@ -638,7 +638,7 @@
                                       intLocalPath.c_str(),
                                       depth,
                                       ignoreAncestry, force, FALSE, dryRun,
-                                      NULL, ctx, requestPool.pool()), );
+                                      NULL, ctx, requestPool), );
 }
 
 jobject
@@ -654,7 +654,7 @@
     apr_hash_t *mergeinfo;
     svn_error_t *err = svn_client_get_mergeinfo(&mergeinfo, target,
                                                 rev.revision(), ctx,
-                                                requestPool.pool());
+                                                requestPool);
     if (err)
     {
         JNIUtil::handleSVNError(err);
@@ -705,7 +705,7 @@
     }
 
     apr_hash_index_t *hi;
-    for (hi = apr_hash_first(requestPool.pool(), mergeinfo);
+    for (hi = apr_hash_first(requestPool, mergeinfo);
          hi;
          hi = apr_hash_next(hi))
     {
@@ -778,12 +778,12 @@
     SVN_JNI_ERR(svn_client_propget2(&props, name,
                                     intPath.c_str(), pegRevision.revision(),
                                     revision.revision(), FALSE,
-                                    ctx, requestPool.pool()),
+                                    ctx, requestPool),
                 NULL);
 
     apr_hash_index_t *hi;
     // only one element since we disabled recurse
-    hi = apr_hash_first (requestPool.pool(), props);
+    hi = apr_hash_first (requestPool, props);
     if (hi == NULL)
         return NULL; // no property with this name
 
@@ -812,7 +812,7 @@
     SVN_JNI_ERR(svn_client_proplist3(intPath.c_str(), pegRevision.revision(),
                                      revision.revision(), recurse,
                                      ProplistCallback::callback, callback,
-                                     ctx, requestPool.pool()), );
+                                     ctx, requestPool), );
 
     return;
 }
@@ -824,7 +824,7 @@
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(name, "name", );
     SVN_JNI_NULL_PTR_EX(value, "value", );
-    svn_string_t *val = svn_string_create(value, requestPool.pool());
+    svn_string_t *val = svn_string_create(value, requestPool);
     propertySet(path, name, val, recurse, force, SVN_INVALID_REVNUM);
 }
 
@@ -845,7 +845,7 @@
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(name, "name", );
     SVN_JNI_NULL_PTR_EX(value, "value", );
-    svn_string_t *val = svn_string_create(value, requestPool.pool());
+    svn_string_t *val = svn_string_create(value, requestPool);
     propertySet(path, name, val, recurse, force, SVN_INVALID_REVNUM);
 }
 
@@ -874,9 +874,9 @@
     apr_file_t *outfile = NULL;
     apr_status_t rv =
         apr_file_open(&outfile,
-                      svn_path_internal_style(outfileName, requestPool.pool()),
+                      svn_path_internal_style(outfileName, requestPool),
                       APR_CREATE|APR_WRITE|APR_TRUNCATE , APR_OS_DEFAULT,
-                      requestPool.pool());
+                      requestPool);
     if (rv != APR_SUCCESS)
     {
         SVN_JNI_ERR(svn_error_createf(rv, NULL, _("Cannot open file '%s'"),
@@ -884,7 +884,7 @@
     }
 
     // We don't use any options to diff.
-    apr_array_header_t *diffOptions = apr_array_make(requestPool.pool(),
+    apr_array_header_t *diffOptions = apr_array_make(requestPool,
                                                      0, sizeof(char *));
 
     if (pegRevision)
@@ -902,7 +902,7 @@
                                    outfile,
                                    NULL /* error file */,
                                    ctx,
-                                   requestPool.pool());
+                                   requestPool);
     }
     else
     {
@@ -930,7 +930,7 @@
                                outfile,
                                NULL /* error file */,
                                ctx,
-                               requestPool.pool());
+                               requestPool);
     }
 
  cleanup:
@@ -990,7 +990,7 @@
                                            ignoreAncestry,
                                            DiffSummaryReceiver::summarize,
                                            &receiver,
-                                           ctx, requestPool.pool()), );
+                                           ctx, requestPool), );
 }
 
 void
@@ -1018,37 +1018,37 @@
                                                ignoreAncestry,
                                                DiffSummaryReceiver::summarize,
                                                &receiver, ctx,
-                                               requestPool.pool()), );
+                                               requestPool), );
 }
 
 svn_client_ctx_t *SVNClient::getContext(const char *message)
 {
-    apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
+    Pool *pool = JNIUtil::getRequestPool();
     svn_auth_baton_t *ab;
     svn_client_ctx_t *ctx;
-    SVN_JNI_ERR(svn_client_create_context(&ctx, pool), NULL);
+    SVN_JNI_ERR(svn_client_create_context(&ctx, *pool), NULL);
 
     apr_array_header_t *providers
-      = apr_array_make (pool, 10, sizeof (svn_auth_provider_object_t *));
+      = apr_array_make(*pool, 10, sizeof (svn_auth_provider_object_t *));
 
     /* The main disk-caching auth providers, for both
        'username/password' creds and 'username' creds.  */
     svn_auth_provider_object_t *provider;
 #ifdef WIN32
-    svn_client_get_windows_simple_provider (&provider, pool);
+    svn_client_get_windows_simple_provider (&provider, *pool);
     APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
 #endif
-    svn_client_get_simple_provider (&provider, pool);
+    svn_client_get_simple_provider (&provider, *pool);
     APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
-    svn_client_get_username_provider (&provider, pool);
+    svn_client_get_username_provider (&provider, *pool);
     APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
 
     /* The server-cert, client-cert, and client-cert-password providers. */
-    svn_client_get_ssl_server_trust_file_provider (&provider, pool);
+    svn_client_get_ssl_server_trust_file_provider (&provider, *pool);
     APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
-    svn_client_get_ssl_client_cert_file_provider (&provider, pool);
+    svn_client_get_ssl_client_cert_file_provider (&provider, *pool);
     APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
-    svn_client_get_ssl_client_cert_pw_file_provider (&provider, pool);
+    svn_client_get_ssl_client_cert_pw_file_provider (&provider, *pool);
     APR_ARRAY_PUSH (providers, svn_auth_provider_object_t *) = provider;
 
     if (m_prompter != NULL)
@@ -1076,7 +1076,7 @@
 
 
     /* Build an authentication baton to give to libsvn_client. */
-    svn_auth_open(&ab, providers, pool);
+    svn_auth_open(&ab, providers, *pool);
 
     /* Place any default --username or --password credentials into the
        auth_baton's run-time parameter hash.  ### Same with --no-auth-cache? */
@@ -1099,7 +1099,7 @@
     const char *configDir = m_configDir.c_str();
     if (m_configDir.length() == 0)
         configDir = NULL;
-    SVN_JNI_ERR(svn_config_get_config (&(ctx->config), configDir, pool), NULL);
+    SVN_JNI_ERR(svn_config_get_config (&(ctx->config), configDir, *pool), NULL);
     ctx->notify_func2= Notify2::notify;
     ctx->notify_baton2 = m_notify2;
 
@@ -1143,7 +1143,7 @@
     if (message != NULL || m_commitMessage)
     {
         log_msg_baton *baton = (log_msg_baton *)
-            apr_palloc(JNIUtil::getRequestPool()->pool(), sizeof(*baton));
+            apr_palloc(*JNIUtil::getRequestPool(), sizeof(*baton));
 
         baton->message = message;
         baton->messageHandler = m_commitMessage;
@@ -1230,7 +1230,7 @@
 
     SVN_JNI_ERR(svn_client_propset3(&commit_info, name, value, intPath.c_str(),
                                     recurse, force, baseRevisionForURL,
-                                    ctx, requestPool.pool()), );
+                                    ctx, requestPool), );
 }
 
 jbyteArray SVNClient::fileContent(const char *path, Revision &revision,
@@ -1242,7 +1242,7 @@
     SVN_JNI_ERR(intPath.error_occured(), NULL);
 
     size_t size = 0;
-    svn_stream_t *read_stream = createReadStream(requestPool.pool(),
+    svn_stream_t *read_stream = createReadStream(requestPool,
                                                  intPath.c_str(), revision,
                                                  pegRevision, size);
     if (read_stream == NULL)
@@ -1296,7 +1296,7 @@
         return;
 
     size_t contentSize = 0;
-    svn_stream_t* read_stream = createReadStream(requestPool.pool(), path,
+    svn_stream_t* read_stream = createReadStream(requestPool, path,
                                                  revision, pegRevision,
                                                  contentSize);
     if (read_stream == NULL)
@@ -1450,7 +1450,7 @@
     svn_string_t *propval;
     svn_revnum_t set_rev;
     SVN_JNI_ERR(svn_client_url_from_path(&URL, intPath.c_str(),
-                                         requestPool.pool()),
+                                         requestPool),
                 NULL);
 
     if (URL == NULL)
@@ -1462,7 +1462,7 @@
 
     SVN_JNI_ERR(svn_client_revprop_get(name, &propval, URL,
                                        rev.revision(), &set_rev, ctx,
-                                       requestPool.pool()),
+                                       requestPool),
                 NULL);
     if (propval == NULL)
         return NULL;
@@ -1491,7 +1491,7 @@
 
     SVN_JNI_ERR(svn_client_relocate(intPath.c_str(), intFrom.c_str(),
                                     intTo.c_str(), recurse, ctx,
-                                    requestPool.pool()), );
+                                    requestPool), );
 }
 
 void SVNClient::blame(const char *path, Revision &pegRevision,
@@ -1500,7 +1500,6 @@
 {
     Pool requestPool;
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    apr_pool_t *pool = requestPool.pool ();
     Path intPath(path);
     SVN_JNI_ERR(intPath.error_occured(), );
 
@@ -1511,8 +1510,9 @@
     SVN_JNI_ERR(svn_client_blame3(intPath.c_str(), pegRevision.revision(),
                                   revisionStart.revision(),
                                   revisionEnd.revision(),
-                                  svn_diff_file_options_create(pool), false,
-                                  BlameCallback::callback, callback, ctx, pool),
+                                  svn_diff_file_options_create(requestPool),
+                                  false, BlameCallback::callback, callback, ctx,
+                                  requestPool),
                 );
 }
 
@@ -1521,7 +1521,7 @@
     // A change to the config directory may necessitate creation of
     // the config templates.
     Pool requestPool;
-    SVN_JNI_ERR(svn_config_ensure(configDir, requestPool.pool()), );
+    SVN_JNI_ERR(svn_config_ensure(configDir, requestPool), );
 
     m_configDir = (configDir == NULL ? "" : configDir);
 }
@@ -1561,7 +1561,7 @@
     SVN_JNI_ERR(srcPaths.error_occured(), );
 
     SVN_JNI_ERR(svn_client_add_to_changelist(srcs, changelist, ctx,
-                                             requestPool.pool()), );
+                                             requestPool), );
 }
 
 void SVNClient::removeFromChangelist(Targets &srcPaths, const char *changelist)
@@ -1573,7 +1573,7 @@
     SVN_JNI_ERR(srcPaths.error_occured(), );
 
     SVN_JNI_ERR(svn_client_remove_from_changelist(srcs, changelist, ctx,
-                                                  requestPool.pool()), );
+                                                  requestPool), );
 }
 
 jobjectArray SVNClient::getChangelist(const char *changelist,
@@ -1584,7 +1584,7 @@
     apr_array_header_t *paths;
 
     SVN_JNI_ERR(svn_client_get_changelist(&paths, changelist, rootPath,
-                                          ctx, requestPool.pool()),
+                                          ctx, requestPool),
                 NULL);
 
     JNIEnv *env = JNIUtil::getEnv();
@@ -1681,7 +1681,7 @@
     svn_client_ctx_t *ctx = getContext(NULL);
 
     SVN_JNI_ERR(svn_client_lock(targetsApr, comment, force, ctx,
-                                requestPool.pool()), );
+                                requestPool), );
 }
 
 void SVNClient::unlock(Targets &targets, bool force)
@@ -1692,7 +1692,7 @@
     SVN_JNI_ERR(targets.error_occured(), );
     svn_client_ctx_t *ctx = getContext(NULL);
     SVN_JNI_ERR(svn_client_unlock((apr_array_header_t*)targetsApr, force,
-                                  ctx, requestPool.pool()), );
+                                  ctx, requestPool), );
 }
 void SVNClient::setRevProperty(jobject jthis, const char *path,
                                const char *name, Revision &rev,
@@ -1710,7 +1710,7 @@
 
     const char *URL;
     SVN_JNI_ERR(svn_client_url_from_path(&URL, intPath.c_str(),
-                                         requestPool.pool()), );
+                                         requestPool), );
 
     if (URL == NULL)
     {
@@ -1719,12 +1719,12 @@
                     );
     }
 
-    svn_string_t *val = svn_string_create(value, requestPool.pool());
+    svn_string_t *val = svn_string_create(value, requestPool);
 
     svn_revnum_t set_revision;
     SVN_JNI_ERR(svn_client_revprop_set(name, val, URL, rev.revision(),
                                        &set_revision, force, ctx,
-                                       requestPool.pool()), );
+                                       requestPool), );
 }
 
 struct version_status_baton
@@ -1824,7 +1824,7 @@
     sb.wc_path = NULL;
     sb.wc_url = NULL;
     sb.done = FALSE;
-    sb.pool = requestPool.pool();
+    sb.pool = requestPool;
 
     Path intPath(path);
     SVN_JNI_ERR(intPath.error_occured(), NULL);
@@ -1832,14 +1832,14 @@
     int wc_format;
     svn_client_ctx_t ctx = { 0 };
     SVN_JNI_ERR(svn_wc_check_wc(intPath.c_str(), &wc_format,
-                                requestPool.pool()),
+                                requestPool),
                 NULL);
 
     if (! wc_format)
     {
         svn_node_kind_t kind;
         SVN_JNI_ERR(svn_io_check_path(intPath.c_str(), &kind,
-                                      requestPool.pool()),
+                                      requestPool),
                     NULL);
         if (kind == svn_node_dir)
         {
@@ -1857,7 +1857,7 @@
     sb.wc_path = path;
     svn_opt_revision_t rev;
     rev.kind = svn_opt_revision_unspecified;
-    ctx.config = apr_hash_make (requestPool.pool());
+    ctx.config = apr_hash_make (requestPool);
 
   /* Setup the notification and cancellation callbacks, and their
      shared baton (which is also shared with the status function). */
@@ -1869,7 +1869,7 @@
     svn_error_t *err;
     err = svn_client_status(NULL, intPath.c_str(), &rev, analyze_status,
                             &sb, TRUE, TRUE, FALSE, FALSE, &ctx,
-                            requestPool.pool());
+                            requestPool);
     if (err && (err->apr_err == SVN_ERR_CANCELLED))
         svn_error_clear (err);
     else
@@ -1920,7 +1920,7 @@
     const char *URL;
     svn_revnum_t set_rev;
     SVN_JNI_ERR(svn_client_url_from_path(&URL, intPath.c_str(),
-                                         requestPool.pool()),
+                                         requestPool),
                 NULL);
 
     svn_client_ctx_t *ctx = getContext(NULL);
@@ -1928,7 +1928,7 @@
         return NULL;
 
     SVN_JNI_ERR(svn_client_revprop_list(&props, URL, revision.revision(),
-                                        &set_rev, ctx, requestPool.pool()),
+                                        &set_rev, ctx, requestPool),
                 NULL);
 
     apr_hash_index_t *hi;
@@ -1949,7 +1949,7 @@
         return NULL;
 
     int i = 0;
-    for (hi = apr_hash_first (requestPool.pool(), props); hi;
+    for (hi = apr_hash_first (requestPool, props); hi;
          hi = apr_hash_next (hi), i++)
     {
         const char *key;
@@ -1993,10 +1993,10 @@
     SVN_JNI_ERR(intPath.error_occured(), NULL);
 
     SVN_JNI_ERR(svn_wc_adm_probe_open2(&adm_access, NULL, intPath.c_str(),
-                                       FALSE, 0, requestPool.pool()),
+                                       FALSE, 0, requestPool),
                 NULL);
     SVN_JNI_ERR(svn_wc_entry(&entry, intPath.c_str(), adm_access, FALSE,
-                             requestPool.pool()),
+                             requestPool),
                 NULL);
 
     return createJavaInfo(entry);
@@ -2174,5 +2174,5 @@
                                 InfoCallback::callback,
                                 callback,
                                 recurse ? TRUE : FALSE,
-                                ctx, requestPool.pool()), );
+                                ctx, requestPool), );
 }
Index: subversion/bindings/javahl/native/Prompter.cpp
===================================================================
--- subversion/bindings/javahl/native/Prompter.cpp	(revision 24532)
+++ subversion/bindings/javahl/native/Prompter.cpp	(working copy)
@@ -531,53 +531,49 @@
 }
 svn_auth_provider_object_t *Prompter::getProviderSimple()
 {
-    apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
     svn_auth_provider_object_t *provider;
     svn_client_get_simple_prompt_provider(&provider,
                                           simple_prompt,
                                           this,
                                           2, /* retry limit */
-                                          pool);
+                                          *JNIUtil::getRequestPool());
 
     return provider;
 }
 svn_auth_provider_object_t *Prompter::getProviderUsername()
 {
-    apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
     svn_auth_provider_object_t *provider;
     svn_client_get_username_prompt_provider(&provider,
                                             username_prompt,
                                             this,
                                             2, /* retry limit */
-                                            pool);
+                                            *JNIUtil::getRequestPool());
 
     return provider;
 }
 svn_auth_provider_object_t *Prompter::getProviderServerSSLTrust()
 {
-    apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
     svn_auth_provider_object_t *provider;
     svn_client_get_ssl_server_trust_prompt_provider
-          (&provider, ssl_server_trust_prompt, this, pool);
+          (&provider, ssl_server_trust_prompt, this, *JNIUtil::getRequestPool());
 
     return provider;
 }
 svn_auth_provider_object_t *Prompter::getProviderClientSSL()
 {
-    apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
     svn_auth_provider_object_t *provider;
     svn_client_get_ssl_client_cert_prompt_provider
-          (&provider, ssl_client_cert_prompt, this, 2, /* retry limit */pool);
+          (&provider, ssl_client_cert_prompt, this, 2, /* retry limit */
+           *JNIUtil::getRequestPool());
 
     return provider;
 }
 svn_auth_provider_object_t *Prompter::getProviderClientSSLPassword()
 {
-    apr_pool_t *pool = JNIUtil::getRequestPool()->pool();
     svn_auth_provider_object_t *provider;
     svn_client_get_ssl_client_cert_pw_prompt_provider
           (&provider, ssl_client_cert_pw_prompt, this, 2 /* retry limit */,
-                                                         pool);
+           *JNIUtil::getRequestPool());
 
     return provider;
 }
Index: subversion/bindings/javahl/native/Targets.cpp
===================================================================
--- subversion/bindings/javahl/native/Targets.cpp	(revision 24532)
+++ subversion/bindings/javahl/native/Targets.cpp	(working copy)
@@ -78,7 +78,7 @@
                 const char *tt = (const char *)text;
                 if (!m_doesNotContainsPath)
                 {
-                    svn_error_t *err = JNIUtil::preprocessPath(tt, pool.pool());
+                    svn_error_t *err = JNIUtil::preprocessPath(tt, pool);
                     if (err != NULL)
                     {
                         m_error_occured = err;
@@ -99,17 +99,13 @@
 
     std::vector<Path>::const_iterator it;
 
-    apr_pool_t *apr_pool = pool.pool ();
     apr_array_header_t *apr_targets =
-      apr_array_make (apr_pool,
-                      m_targets.size(),
-                      sizeof (const char *));
+      apr_array_make(pool, m_targets.size(), sizeof (const char *));
 
     for (it = m_targets.begin (); it != m_targets.end (); it++)
     {
       const Path &path = *it;
-      const char *target =
-        apr_pstrdup (apr_pool, path.c_str());
+      const char *target = apr_pstrdup (pool, path.c_str());
       (*((const char **) apr_array_push (apr_targets))) = target;
     }
 
Index: subversion/bindings/javahl/native/Inputer.cpp
===================================================================
--- subversion/bindings/javahl/native/Inputer.cpp	(revision 24532)
+++ subversion/bindings/javahl/native/Inputer.cpp	(working copy)
@@ -49,7 +49,7 @@
 {
     // create a stream with this as the baton and set the read and close
     // functions
-    svn_stream_t *ret = svn_stream_create(this, pool.pool());
+    svn_stream_t *ret = svn_stream_create(this, pool);
     svn_stream_set_read(ret, Inputer::read);
     svn_stream_set_close(ret, Inputer::close);
     return ret;

