Modified: subversion/branches/fsx-1.10/build/generator/gen_win_dependencies.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/build/generator/gen_win_dependencies.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/build/generator/gen_win_dependencies.py (original) +++ subversion/branches/fsx-1.10/build/generator/gen_win_dependencies.py Sun Jun 14 20:58:10 2015 @@ -19,7 +19,7 @@ # # # -# gen_win_dependencies.py +# gen_win_dependencies.py # # base class for generating windows projects, containing the # dependency locator code shared between the test runner and @@ -73,22 +73,22 @@ class SVNCommonLibrary: self.debug_lib_dir = debug_lib_dir else: self.debug_lib_dir = lib_dir - + if debug_lib_name: self.debug_lib_name = debug_lib_name else: self.debug_lib_name = lib_name - + if debug_dll_dir: self.debug_dll_dir = debug_dll_dir else: self.debug_dll_dir = dll_dir - + if debug_dll_name: self.debug_dll_name = debug_dll_name else: self.debug_dll_name = dll_name - + self.extra_bin = extra_bin class GenDependenciesBase(gen_base.GeneratorBase): @@ -253,6 +253,18 @@ class GenDependenciesBase(gen_base.Gener self.sln_version = '12.00' self.vcproj_version = '12.0' self.vcproj_extension = '.vcxproj' + elif val == '2015' or val == '14': + self.vs_version = '2015' + self.sln_version = '12.00' + self.vcproj_version = '14.0' + self.vcproj_extension = '.vcxproj' + elif re.match('^20\d+$', val): + print('WARNING: Unknown VS.NET version "%s",' + ' assuming VS2012. Your VS can probably upgrade') + self.vs_version = '2012' + self.sln_version = '12.00' + self.vcproj_version = '11.0' + self.vcproj_extension = '.vcxproj' elif re.match('^1\d+$', val): self.vs_version = val self.sln_version = '12.00' @@ -278,13 +290,13 @@ class GenDependenciesBase(gen_base.Gener if find_libs: self.find_libraries(False) - + def find_libraries(self, show_warnings): "find required and optional libraries" # Required dependencies self._find_apr() - self._find_apr_util_and_expat() + self._find_apr_util_etc() self._find_zlib() self._find_sqlite(show_warnings) @@ -312,7 +324,7 @@ class GenDependenciesBase(gen_base.Gener if not self.apr_path: sys.stderr.write("ERROR: Use '--with-apr' option to configure APR " + \ "location.\n") - sys.exit(1) + sys.exit(1) inc_base = os.path.join(self.apr_path, 'include') @@ -391,18 +403,18 @@ class GenDependenciesBase(gen_base.Gener extra_bin = [] - if dll_dir: + if dll_dir: bin_files = os.listdir(dll_dir) if debug_dll_dir and os.path.isdir(debug_dll_dir): debug_bin_files = os.listdir(debug_dll_dir) else: - debug_bin_files = bin_files - + debug_bin_files = bin_files + for bin in bin_files: if bin in debug_bin_files: if re.match('^(lib)?apr[-_].*' + suffix + '(d)?.dll$', bin): extra_bin.append(bin) - + self._libraries['apr'] = SVNCommonLibrary('apr', inc_path, lib_dir, lib_name, apr_version, debug_lib_dir=debug_lib_dir, @@ -412,7 +424,7 @@ class GenDependenciesBase(gen_base.Gener defines=defines, extra_bin=extra_bin) - def _find_apr_util_and_expat(self): + def _find_apr_util_etc(self): "Find the APR-util library and version" minimal_aprutil_version = (1, 3, 0) @@ -442,7 +454,7 @@ class GenDependenciesBase(gen_base.Gener version = (major, minor, patch) self.aprutil_version = aprutil_version = '%d.%d.%d' % version - + if version < minimal_aprutil_version: sys.stderr.write("ERROR: apr-util %s or higher is required " "(%s found)\n" % ( @@ -462,7 +474,7 @@ class GenDependenciesBase(gen_base.Gener debug_dll_dir = None dll_name = None defines.extend(["APU_DECLARE_STATIC"]) - + if not os.path.isdir(lib_dir) and \ os.path.isfile(os.path.join(self.apr_util_path, 'lib', lib_name)): # Installed APR-Util instead of APR-Util-Source @@ -473,7 +485,7 @@ class GenDependenciesBase(gen_base.Gener else: lib_name = 'libaprutil%s.lib' % suffix lib_dir = os.path.join(self.apr_util_path, 'Release') - + if not os.path.isdir(lib_dir) and \ os.path.isfile(os.path.join(self.apr_util_path, 'lib', lib_name)): # Installed APR-Util instead of APR-Util-Source @@ -481,7 +493,7 @@ class GenDependenciesBase(gen_base.Gener debug_lib_dir = lib_dir else: debug_lib_dir = os.path.join(self.apr_util_path, 'Debug') - + dll_name = 'libaprutil%s.dll' % suffix if os.path.isfile(os.path.join(lib_dir, dll_name)): dll_dir = lib_dir @@ -491,13 +503,13 @@ class GenDependenciesBase(gen_base.Gener debug_dll_dir = None extra_bin = [] - + if dll_dir: bin_files = os.listdir(dll_dir) if debug_dll_dir and os.path.isdir(debug_dll_dir): debug_bin_files = os.listdir(debug_dll_dir) else: - debug_bin_files = bin_files + debug_bin_files = bin_files for bin in bin_files: if bin in debug_bin_files: @@ -514,6 +526,13 @@ class GenDependenciesBase(gen_base.Gener defines=defines, extra_bin=extra_bin) + # Perhaps apr-util can also provide memcached support + if version >= (1, 3, 0) : + self._libraries['apr_memcache'] = SVNCommonLibrary( + 'apr_memcache', inc_path, lib_dir, + None, aprutil_version, + defines=['SVN_HAVE_MEMCACHE']) + # And now find expat # If we have apr-util as a source location, it is in a subdir. # If we have an install package it is in the lib subdir @@ -688,7 +707,7 @@ class GenDependenciesBase(gen_base.Gener # CMake default: zlibstatic.lib (static) and zlib.lib (dll) lib_name = 'zlibstatic.lib' else: - # Standard makefile produces zlib.lib (static) and zdll.lib (dll) + # Standard makefile produces zlib.lib (static) and zdll.lib (dll) lib_name = 'zlib.lib' debug_lib_name = None else: @@ -711,7 +730,7 @@ class GenDependenciesBase(gen_base.Gener version = tuple(map(int, vermatch.groups())) self.zlib_version = '%d.%d.%d' % version - + if version < minimal_zlib_version: sys.stderr.write("ERROR: ZLib %s or higher is required " "(%s found)\n" % ( @@ -804,10 +823,10 @@ class GenDependenciesBase(gen_base.Gener def _find_openssl(self, show_warnings): "Find openssl" - + if not self.openssl_path: return - + version_path = os.path.join(self.openssl_path, 'inc32/openssl/opensslv.h') if os.path.isfile(version_path): # We have an OpenSSL Source location @@ -840,12 +859,12 @@ class GenDependenciesBase(gen_base.Gener vermatch = re.search( r'#\s*define\s+OPENSSL_VERSION_TEXT\s+"OpenSSL\s+((\d+)\.(\d+).(\d+)([^ -]*))', txt) - - version = (int(vermatch.group(2)), + + version = (int(vermatch.group(2)), int(vermatch.group(3)), int(vermatch.group(4))) openssl_version = vermatch.group(1) - + self._libraries['openssl'] = SVNCommonLibrary('openssl', inc_dir, lib_dir, 'ssleay32.lib', openssl_version, @@ -1378,7 +1397,7 @@ class GenDependenciesBase(gen_base.Gener # Amalgamation inc_dir = sqlite_base lib_dir = None - lib_name = None + lib_name = None defines.append('SVN_SQLITE_INLINE') else: sys.stderr.write("ERROR: SQLite not found\n")
Modified: subversion/branches/fsx-1.10/build/generator/templates/build-outputs.mk.ezt URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/build/generator/templates/build-outputs.mk.ezt?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/build/generator/templates/build-outputs.mk.ezt (original) +++ subversion/branches/fsx-1.10/build/generator/templates/build-outputs.mk.ezt Sun Jun 14 20:58:10 2015 @@ -46,6 +46,7 @@ MANPAGES =[for manpages] [manpages][end] CLEAN_FILES =[for cfiles] [cfiles][end] EXTRACLEAN_FILES =[for sql] [sql.header][end] \ $(abs_builddir)/subversion/libsvn_subr/errorcode.inc \ + $(abs_builddir)/subversion/libsvn_subr/config_keys.inc \ $(abs_srcdir)/compile_commands.json SWIG_INCLUDES = -I$(abs_builddir)/subversion \ Modified: subversion/branches/fsx-1.10/build/generator/templates/vcnet_vcxproj.ezt URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/build/generator/templates/vcnet_vcxproj.ezt?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/build/generator/templates/vcnet_vcxproj.ezt (original) +++ subversion/branches/fsx-1.10/build/generator/templates/vcnet_vcxproj.ezt Sun Jun 14 20:58:10 2015 @@ -62,7 +62,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> <DisableSpecificWarnings>4100;4127;4206;4512;4701;4706;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings> - <TreatSpecificWarningsAsErrors>4002;4003;4013;4020;4022;4024;4028;4029;4030;4031;4033;4047;4089;4113;4115;4204;4715;%(TreatSpecificWarningsAsErrors)</TreatSpecificWarningsAsErrors> + <TreatSpecificWarningsAsErrors>4002;4003;4013;4020;4022;4024;4028;4029;4030;4031;4033;4047;4089;4113;4115;4133;4204;4715;%(TreatSpecificWarningsAsErrors)</TreatSpecificWarningsAsErrors> [if-any configs.forced_include_files] <ForcedIncludeFiles>[for configs.forced_include_files][configs.forced_include_files];[end]%(ForcedIncludeFiles)</ForcedIncludeFiles> [end] </ClCompile> [is config_type "Application"] <Link> Modified: subversion/branches/fsx-1.10/build/getversion.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/build/getversion.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/build/getversion.py (original) +++ subversion/branches/fsx-1.10/build/getversion.py Sun Jun 14 20:58:10 2015 @@ -26,6 +26,7 @@ import os import re import sys +import traceback __all__ = ['Parser', 'Result'] @@ -64,8 +65,10 @@ def svn_extractor(parser, include_file): try: r = p.parse(include_file) - except IOError, e: - usage_and_exit(str(e)) + except IOError: + typ, val, tb = sys.exc_info() + msg = ''.join(traceback.format_exception_only(typ, val)) + usage_and_exit(msg) sys.stdout.write("%d.%d.%d" % (r.major, r.minor, r.patch)) @@ -75,8 +78,10 @@ def sqlite_extractor(parser, include_fil try: r = p.parse(include_file) - except IOError, e: - usage_and_exit(str(e)) + except IOError: + typ, val, tb = sys.exc_info() + msg = ''.join(traceback.format_exception_only(typ, val)) + usage_and_exit(msg) major = r.version / 1000000 minor = (r.version - (major * 1000000)) / 1000 micro = (r.version - (major * 1000000) - (minor * 1000)) Modified: subversion/branches/fsx-1.10/build/run_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/build/run_tests.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/build/run_tests.py (original) +++ subversion/branches/fsx-1.10/build/run_tests.py Sun Jun 14 20:58:10 2015 @@ -45,7 +45,7 @@ separated list of test numbers; the defa ''' # A few useful constants -SVN_VER_MINOR = 9 +SVN_VER_MINOR = 10 import os, re, subprocess, sys, imp, threading, traceback, exceptions from datetime import datetime @@ -386,6 +386,8 @@ class TestHarness: '--srcdir=' + os.path.join(self.srcdir, progdir)] if self.config_file is not None: cmdline.append('--config-file=' + self.config_file) + elif self.memcached_server is not None: + cmdline.append('--memcached-server=' + self.memcached_server) if self.base_url is not None: subdir = 'subversion/tests/cmdline/svn-test-work' Modified: subversion/branches/fsx-1.10/build/transform_sql.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/build/transform_sql.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/build/transform_sql.py (original) +++ subversion/branches/fsx-1.10/build/transform_sql.py Sun Jun 14 20:58:10 2015 @@ -140,7 +140,7 @@ class Processor(object): # '/'+1 == '0' line = re.sub( - r'IS_STRICT_DESCENDANT_OF[(]([A-Za-z_.]+), ([?][0-9]+)[)]', + r'IS_STRICT_DESCENDANT_OF[(]([?]?[A-Za-z0-9_.]+), ([?]?[A-Za-z0-9_.]+)[)]', r"(((\1) > (CASE (\2) WHEN '' THEN '' ELSE (\2) || '/' END))" + r" AND ((\1) < CASE (\2) WHEN '' THEN X'FFFF' ELSE (\2) || '0' END))", line) @@ -194,14 +194,14 @@ class Processor(object): line) # Another preprocessing. - for symbol, string in self.token_map.iteritems(): + for symbol, string in self.token_map.items(): # ### This doesn't sql-escape 'string' line = re.sub(r'\b%s\b' % re.escape(symbol), "'%s'" % string, line) if line.strip(): handled = False - for regex, handler in self._directives.iteritems(): + for regex, handler in self._directives.items(): match = regex.match(line) if match: handler(match) Modified: subversion/branches/fsx-1.10/configure.ac URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/configure.ac?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/configure.ac (original) +++ subversion/branches/fsx-1.10/configure.ac Sun Jun 14 20:58:10 2015 @@ -1283,7 +1283,7 @@ fi AC_PATH_PROGS(PYTHON, "$PYTHON", none) # The minimum version for the JVM runtime for our Java bytecode. -JAVA_OLDEST_WORKING_VER='1.5' +JAVA_OLDEST_WORKING_VER='1.6' # SVN_CHECK_JDK sets $JAVA_CLASSPATH SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER) @@ -1354,6 +1354,19 @@ AS_HELP_STRING([--enable-runtime-module- fi AC_DEFINE(SVN_USE_DSO, 1, [Defined if svn should try to load DSOs]) + + dnl Mac OS X uses libname.MAJOR.SOVERSION.dylib + dnl Most other unixes use libname.MAJOR.so.SOVERSION + case "$host" in + *-*-darwin*) + AC_DEFINE(SVN_DSO_SUFFIX_FMT, ["%d.%d.dylib"], + [Shared library file name suffix format]) + ;; + *) + AC_DEFINE(SVN_DSO_SUFFIX_FMT, ["%d.so.%d"], + [Shared library file name suffix format]) + ;; + esac fi ]) @@ -1455,8 +1468,15 @@ if test "$do_javahl_build" = "yes"; then # it. AC_MSG_CHECKING([for additional flags to link C++ libraries]) if test "x$ac_compiler_gnu" = "xyes"; then - LT_CXX_LIBADD="-lstdc++" - AC_MSG_RESULT([$LT_CXX_LIBADD]) + case "$host" in + *freebsd10*) + AC_MSG_RESULT([none needed]) + ;; + *) + LT_CXX_LIBADD="-lstdc++" + AC_MSG_RESULT([$LT_CXX_LIBADD]) + ;; + esac else AC_MSG_RESULT([none needed]) fi Modified: subversion/branches/fsx-1.10/contrib/client-side/svncopy/svncopy.pl.in URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/contrib/client-side/svncopy/svncopy.pl.in?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/contrib/client-side/svncopy/svncopy.pl.in (original) +++ subversion/branches/fsx-1.10/contrib/client-side/svncopy/svncopy.pl.in Sun Jun 14 20:58:10 2015 @@ -970,6 +970,12 @@ B<svncopy> - extended form of B<svn copy B<svncopy.pl> [option ...] source [source ...] destination +-------------------------------------------------------------------------- +NOTE: This script is deprecated. Please use 'svn copy --pin-externals' for +pinning externals, and use the relative external URL syntax instead of the +'--update-externals' functionality of this script. +-------------------------------------------------------------------------- + This script copies one Subversion location or set of locations to another, in the same way as B<svn copy>. Using the script allows more advanced operations, in particular allowing svn:externals to be dealt with properly for branching Modified: subversion/branches/fsx-1.10/doc/doxygen.conf URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/doc/doxygen.conf?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/doc/doxygen.conf (original) +++ subversion/branches/fsx-1.10/doc/doxygen.conf Sun Jun 14 20:58:10 2015 @@ -33,6 +33,13 @@ PROJECT_NAME = Subversion PROJECT_NUMBER = +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = doc/svn-square.jpg + # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location Modified: subversion/branches/fsx-1.10/gen-make.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/gen-make.py?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/gen-make.py (original) +++ subversion/branches/fsx-1.10/gen-make.py Sun Jun 14 20:58:10 2015 @@ -25,7 +25,9 @@ import os +import traceback import sys + import getopt try: my_getopt = getopt.gnu_getopt @@ -65,6 +67,7 @@ def main(fname, gentype, verfname=None, generator.write() generator.write_sqlite_headers() generator.write_errno_table() + generator.write_config_keys() if ('--debug', '') in other_options: for dep_type, target_dict in generator.graph.deps.items(): @@ -204,7 +207,7 @@ def _usage_exit(err=None): print("") print(" --vsnet-version=VER") print(" generate for VS.NET version VER (2002, 2003, 2005, 2008,") - print(" 2010, 2012 or 2013)") + print(" 2010, 2012, 2013 or 2015)") print(" [only valid in combination with '-t vcproj']") print("") print(" -D NAME[=value]") @@ -266,8 +269,10 @@ if __name__ == '__main__': ]) if len(args) > 1: _usage_exit("Too many arguments") - except getopt.GetoptError, e: - _usage_exit(str(e)) + except getopt.GetoptError: + typ, val, tb = sys.exc_info() + msg = ''.join(traceback.format_exception_only(typ, val)) + _usage_exit(msg) conf = 'build.conf' skip = 0 Propchange: subversion/branches/fsx-1.10/notes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Jun 14 20:58:10 2015 @@ -23,6 +23,7 @@ /subversion/branches/log-g-performance/notes:870941-871032 /subversion/branches/merge-skips-obstructions/notes:874525-874615 /subversion/branches/nfc-nfd-aware-client/notes:870276,870376 +/subversion/branches/pin-externals/notes:1643757-1659392 /subversion/branches/ra_serf-digest-authn/notes:875693-876404 /subversion/branches/reintegrate-improvements/notes:873853-874164 /subversion/branches/subtree-mergeinfo/notes:876734-878766 @@ -38,3 +39,4 @@ /subversion/branches/tc_url_rev/notes:874351-874483 /subversion/branches/tree-conflicts/notes:868291-873154 /subversion/branches/tree-conflicts-notify/notes:873926-874008 +/subversion/trunk/notes:1658218-1685462 Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/README URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/README?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/README (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/README Sun Jun 14 20:58:10 2015 @@ -5,7 +5,7 @@ JavaHL provides a (mostly native, using a high level Java API for Subversion, which was originally targeted for implementors of GUI clients and IDE plug-ins for Subversion. JavaHL currently provides a minimal-but-complete set of APIs which expose the -core Subversion C API to Java. It requires a JRE 1.5+ (runtime). +core Subversion C API to Java. It requires a JRE 1.6+ (runtime). It is currently quite mature, and can be considered for production use. @@ -13,8 +13,9 @@ It is currently quite mature, and can be Build system ------------ -JavaHL should compile and run under Linux, Win32, and Mac OS X with a -JDK 1.5+. +JavaHL should compile and run under Linux, Win32, and Mac OS X with +JDK 1.6+ and a C++ compiler with a complete implementation of +C++98 (for example, GCC 3.2 and older cannot compile JavaHL 1.9+). Its build will produce both a native library (libsvnjavahl-1.so on Unix or libsvnjavahl-1.dll on Win32) and a platform independent archive of @@ -22,26 +23,29 @@ Java bytecode (svn-javahl.jar). To build JavaHL on non-Win32 platforms, just add "--enable-javahl" to the configure script's parameters. "--with-jdk" can be provided to -specify the path to a jdk. "--with-maintainer-mode" will compile Java -bytecode with debugging information. Jikes will be the preferred -compiler if it is auto-detected. If not auto-detected, you can force -its use via the "--with-jikes=path" flag to configure. +specify the path to a jdk. "--enable-maintainer-mode" will compile +Java bytecode with debugging information. The following make targets are provided: -javahl build javahl -install-javahl install javahl -check-javahl run javahl tests +javahl build JavaHL +install-javahl install JavaHL +check-javahl run JavaHL tests +check-all-javahl run all JavaHL tests, including tests for + deprecated backward-compatibility APIs. (In order to run check-javahl, you must have specified a path to a JUnit -jar file with --with-junit when running configure; JUnit version 3.8.1 +jar file with --with-junit when running configure; JUnit version 4.11 has been tested. JUnit can be downloaded from http://junit.org/ .) MacOS X: -After building libsvnjavahl.dynlib, you must rename it to -libsvnjavahl.jnilib. Additionally, it should probably be installed in +After building libsvnjavahl.dylib, you must rename it to +libsvnjavahl.jnilib. Make install-javahl creates a symbolic +link with the appropriate name. + +Additionally, it should probably be installed in /Library/Java/Extensions instead of wherever the build system chose to install it; patches to our build system to do this automatically are welcome. @@ -60,6 +64,7 @@ Success stories --------------- Subclipse, Eclipse IDE plug-in <http://subclipse.tigris.org/> +SmartSVN, cross-platform Subversion client (http://www.smartsvn.com/) Why not 100% pure Java? @@ -86,6 +91,8 @@ as to its compatibility with the officia TODO ---- +o Transition all of the implementation to the new-style jniwrapper. o Expose more of Subversion's core libraries through JNI. o More JUnit test cases. +o Refactor the JUnit tests to use the improved features of JUnit 4. o Improve JavaDoc and coding style. Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/AuthnCallback.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/AuthnCallback.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/AuthnCallback.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/AuthnCallback.cpp Sun Jun 14 20:58:10 2015 @@ -38,39 +38,39 @@ namespace JavaHL { // Class JavaHL::AuthnCallback const char* const AuthnCallback::m_class_name = - JAVA_PACKAGE"/callback/AuthnCallback"; + JAVAHL_CLASS("/callback/AuthnCallback"); AuthnCallback::ClassImpl::ClassImpl(::Java::Env env, jclass cls) : ::Java::Object::ClassImpl(env, cls), m_mid_username_prompt( env.GetMethodID(cls, "usernamePrompt", "(Ljava/lang/String;Z)" - "L"JAVA_PACKAGE"/callback/AuthnCallback" + JAVAHL_ARG("/callback/AuthnCallback") "$UsernameResult;")), m_mid_user_password_prompt( env.GetMethodID(cls, "userPasswordPrompt", "(Ljava/lang/String;Ljava/lang/String;Z)" - "L"JAVA_PACKAGE"/callback/AuthnCallback" + JAVAHL_ARG("/callback/AuthnCallback") "$UserPasswordResult;")), m_mid_ssl_server_trust_prompt( env.GetMethodID(cls, "sslServerTrustPrompt", "(Ljava/lang/String;" - "L"JAVA_PACKAGE"/callback/AuthnCallback" + JAVAHL_ARG("/callback/AuthnCallback") "$SSLServerCertFailures;" - "L"JAVA_PACKAGE"/callback/AuthnCallback" + JAVAHL_ARG("/callback/AuthnCallback") "$SSLServerCertInfo;" "Z)" - "L"JAVA_PACKAGE"/callback/AuthnCallback" + JAVAHL_ARG("/callback/AuthnCallback") "$SSLServerTrustResult;")), m_mid_ssl_client_cert_prompt( env.GetMethodID(cls, "sslClientCertPrompt", "(Ljava/lang/String;Z)" - "L"JAVA_PACKAGE"/callback/AuthnCallback" + JAVAHL_ARG("/callback/AuthnCallback") "$SSLClientCertResult;")), m_mid_ssl_client_cert_passphrase_prompt( env.GetMethodID(cls, "sslClientCertPassphrasePrompt", "(Ljava/lang/String;Z)" - "L"JAVA_PACKAGE"/callback/AuthnCallback" + JAVAHL_ARG("/callback/AuthnCallback") "$SSLClientCertPassphraseResult;")), m_mid_allow_store_plaintext_password( env.GetMethodID(cls, "allowStorePlaintextPassword", @@ -143,7 +143,7 @@ bool AuthnCallback::allow_store_plaintex // Class JavaHL::AuthnCallback::AuthnResult const char* const AuthnCallback::AuthnResult::m_class_name = - JAVA_PACKAGE"/callback/AuthnCallback$AuthnResult"; + JAVAHL_CLASS("/callback/AuthnCallback$AuthnResult"); AuthnCallback::AuthnResult::ClassImpl::ClassImpl(::Java::Env env, jclass cls) : ::Java::Object::ClassImpl(env, cls), @@ -157,7 +157,7 @@ AuthnCallback::AuthnResult::ClassImpl::~ // Class JavaHL::AuthnCallback::SSLServerCertFailures const char* const AuthnCallback::SSLServerCertFailures::m_class_name = - JAVA_PACKAGE"/callback/AuthnCallback$SSLServerCertFailures"; + JAVAHL_CLASS("/callback/AuthnCallback$SSLServerCertFailures"); AuthnCallback::SSLServerCertFailures::ClassImpl::ClassImpl( ::Java::Env env, jclass cls) @@ -178,7 +178,7 @@ AuthnCallback::SSLServerCertFailures::SS // Class JavaHL::AuthnCallback::SSLServerCertInfo const char* const AuthnCallback::SSLServerCertInfo::m_class_name = - JAVA_PACKAGE"/callback/AuthnCallback$SSLServerCertInfo"; + JAVAHL_CLASS("/callback/AuthnCallback$SSLServerCertInfo"); AuthnCallback::SSLServerCertInfo::ClassImpl::ClassImpl( ::Java::Env env, jclass cls) @@ -259,7 +259,7 @@ AuthnCallback::SSLServerCertInfo::SSLSer // Class JavaHL::UserPasswordCallback const char* const UserPasswordCallback::m_class_name = - JAVA_PACKAGE"/callback/UserPasswordCallback"; + JAVAHL_CLASS("/callback/UserPasswordCallback"); UserPasswordCallback::ClassImpl::ClassImpl(::Java::Env env, jclass cls) : ::Java::Object::ClassImpl(env, cls), Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/BlameCallback.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/BlameCallback.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/BlameCallback.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/BlameCallback.cpp Sun Jun 14 20:58:10 2015 @@ -92,7 +92,7 @@ BlameCallback::singleLine(svn_revnum_t s static jmethodID mid = 0; if (mid == 0) { - jclass clazz = env->FindClass(JAVA_PACKAGE"/callback/BlameCallback"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/callback/BlameCallback")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN(SVN_NO_ERROR); @@ -128,8 +128,6 @@ BlameCallback::singleLine(svn_revnum_t s env->CallVoidMethod(m_callback, mid, (jlong)line_no, (jlong)revision, jrevProps, (jlong)mergedRevision, jmergedRevProps, jmergedPath, jline, (jboolean)localChange); - // No need to check for an exception here, because we return anyway. - env->PopLocalFrame(NULL); - return SVN_NO_ERROR; + POP_AND_RETURN_EXCEPTION_AS_SVNERROR(); } Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/ChangelistCallback.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/ChangelistCallback.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/ChangelistCallback.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/ChangelistCallback.cpp Sun Jun 14 20:58:10 2015 @@ -78,7 +78,7 @@ ChangelistCallback::doChangelist(const c // it can be cached. if (mid == 0) { - jclass clazz = env->FindClass(JAVA_PACKAGE"/callback/ChangelistCallback"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/callback/ChangelistCallback")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NOTHING(); Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/ClientContext.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/ClientContext.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/ClientContext.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/ClientContext.cpp Sun Jun 14 20:58:10 2015 @@ -42,7 +42,7 @@ ClientContext::ClientContext(jobject jsv : OperationContext(pool) { static jfieldID ctxFieldID = 0; - attachJavaObject(jsvnclient, "L"JAVA_PACKAGE"/SVNClient$ClientContext;", "clientContext", &ctxFieldID); + attachJavaObject(jsvnclient, JAVAHL_ARG("/SVNClient$ClientContext;"), "clientContext", &ctxFieldID); SVN_JNI_ERR(svn_client_create_context2(&m_context, NULL, pool.getPool()), @@ -182,7 +182,7 @@ ClientContext::notify(void *baton, return; mid = env->GetMethodID(clazz, "onNotify", - "(L"JAVA_PACKAGE"/ClientNotifyInformation;)V"); + "(" JAVAHL_ARG("/ClientNotifyInformation;") ")V"); if (JNIUtil::isJavaExceptionThrown() || mid == 0) return; @@ -223,8 +223,8 @@ ClientContext::resolve(svn_wc_conflict_r POP_AND_RETURN(SVN_NO_ERROR); mid = env->GetMethodID(clazz, "resolve", - "(L"JAVA_PACKAGE"/ConflictDescriptor;)" - "L"JAVA_PACKAGE"/ConflictResult;"); + "(" JAVAHL_ARG("/ConflictDescriptor;") ")" + JAVAHL_ARG("/ConflictResult;")); if (JNIUtil::isJavaExceptionThrown() || mid == 0) POP_AND_RETURN(SVN_NO_ERROR); } @@ -276,7 +276,7 @@ ClientContext::javaResultToC(jobject jre jclass clazz = NULL; if (getChoice == 0 || getMergedPath == 0) { - clazz = env->FindClass(JAVA_PACKAGE "/ConflictResult"); + clazz = env->FindClass(JAVAHL_CLASS("/ConflictResult")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; } @@ -284,7 +284,7 @@ ClientContext::javaResultToC(jobject jre if (getChoice == 0) { getChoice = env->GetMethodID(clazz, "getChoice", - "()L"JAVA_PACKAGE"/ConflictResult$Choice;"); + "()" JAVAHL_ARG("/ConflictResult$Choice;")); if (JNIUtil::isJavaExceptionThrown() || getChoice == 0) POP_AND_RETURN_NULL; } Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitCallback.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitCallback.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitCallback.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitCallback.cpp Sun Jun 14 20:58:10 2015 @@ -80,13 +80,13 @@ CommitCallback::commitInfo(const svn_com static jmethodID sm_mid = 0; if (sm_mid == 0) { - jclass clazz = env->FindClass(JAVA_PACKAGE"/callback/CommitCallback"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/callback/CommitCallback")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN(SVN_NO_ERROR); sm_mid = env->GetMethodID(clazz, "commitInfo", - "(L"JAVA_PACKAGE"/CommitInfo;)V"); + "(" JAVAHL_ARG("/CommitInfo;") ")V"); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN(SVN_NO_ERROR); } @@ -96,10 +96,8 @@ CommitCallback::commitInfo(const svn_com POP_AND_RETURN(SVN_NO_ERROR); env->CallVoidMethod(m_callback, sm_mid, jcommitInfo); - // No need to check for an exception here, because we return anyway. - env->PopLocalFrame(NULL); - return SVN_NO_ERROR; + POP_AND_RETURN_EXCEPTION_AS_SVNERROR(); } Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitEditor.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitEditor.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitEditor.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitEditor.cpp Sun Jun 14 20:58:10 2015 @@ -48,7 +48,7 @@ CommitEditor::getCppObject(jobject jthis { static jfieldID fid = 0; jlong cppAddr = SVNBase::findCppAddrForJObject( - jthis, &fid, JAVA_PACKAGE"/remote/CommitEditor"); + jthis, &fid, JAVAHL_CLASS("/remote/CommitEditor")); return (cppAddr == 0 ? NULL : reinterpret_cast<CommitEditor*>(cppAddr)); } @@ -136,7 +136,7 @@ void CommitEditor::dispose(jobject jthis abort(); static jfieldID fid = 0; - SVNBase::dispose(jthis, &fid, JAVA_PACKAGE"/remote/CommitEditor"); + SVNBase::dispose(jthis, &fid, JAVAHL_CLASS("/remote/CommitEditor")); } namespace { @@ -184,7 +184,7 @@ build_checksum(jobject jchecksum, SVN::P if (0 == digest_mid || 0 == kind_mid) { - jclass cls = env->FindClass(JAVA_PACKAGE"/types/Checksum"); + jclass cls = env->FindClass(JAVAHL_CLASS("/types/Checksum")); if (JNIUtil::isJavaExceptionThrown()) return checksum; @@ -192,7 +192,7 @@ build_checksum(jobject jchecksum, SVN::P if (JNIUtil::isJavaExceptionThrown()) return checksum; kind_mid = env->GetMethodID(cls, "getKind", "()L" - JAVA_PACKAGE"/types/Checksum$Kind;"); + JAVAHL_CLASS("/types/Checksum$Kind;")); if (JNIUtil::isJavaExceptionThrown()) return checksum; } Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitMessage.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitMessage.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitMessage.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CommitMessage.cpp Sun Jun 14 20:58:10 2015 @@ -73,7 +73,7 @@ CommitMessage::getCommitMessage(const ch static jmethodID midCallback = 0; if (midCallback == 0) { - jclass clazz2 = env->FindClass(JAVA_PACKAGE"/callback/CommitMessageCallback"); + jclass clazz2 = env->FindClass(JAVAHL_CLASS("/callback/CommitMessageCallback")); if (JNIUtil::isJavaExceptionThrown()) return SVN_NO_ERROR; @@ -106,7 +106,7 @@ CommitMessage::getCommitMessage(const ch midCallback, CreateJ::Set(jitems)); if (JNIUtil::isJavaExceptionThrown()) - POP_AND_RETURN(SVN_NO_ERROR); + POP_AND_RETURN_EXCEPTION_AS_SVNERROR(); if (jmessage != NULL) { Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CopySources.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CopySources.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CopySources.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CopySources.cpp Sun Jun 14 20:58:10 2015 @@ -60,7 +60,7 @@ CopySources::makeJCopySource(const char if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; - jclass clazz = env->FindClass(JAVA_PACKAGE "/types/CopySource"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/types/CopySource")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -69,8 +69,8 @@ CopySources::makeJCopySource(const char { ctor = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;" - "L" JAVA_PACKAGE "/types/Revision;" - "L" JAVA_PACKAGE "/types/Revision;)V"); + JAVAHL_ARG("/types/Revision;") + JAVAHL_ARG("/types/Revision;") ")V"); if (JNIUtil::isExceptionThrown()) POP_AND_RETURN_NULL; } @@ -88,7 +88,7 @@ CopySources::array(SVN::Pool &pool) apr_pool_t *p = pool.getPool(); JNIEnv *env = JNIUtil::getEnv(); - jclass clazz = env->FindClass(JAVA_PACKAGE "/types/CopySource"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/types/CopySource")); if (JNIUtil::isJavaExceptionThrown()) return NULL; @@ -132,7 +132,7 @@ CopySources::array(SVN::Pool &pool) if (getRevision == 0) { getRevision = env->GetMethodID(clazz, "getRevision", - "()L"JAVA_PACKAGE"/types/Revision;"); + "()" JAVAHL_ARG("/types/Revision;")); if (JNIUtil::isJavaExceptionThrown() || getRevision == 0) return NULL; } @@ -151,7 +151,7 @@ CopySources::array(SVN::Pool &pool) if (getPegRevision == 0) { getPegRevision = env->GetMethodID(clazz, "getPegRevision", - "()L"JAVA_PACKAGE"/types/Revision;"); + "()" JAVAHL_ARG("/types/Revision;")); if (JNIUtil::isJavaExceptionThrown() || getPegRevision == 0) return NULL; } Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CreateJ.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CreateJ.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CreateJ.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/CreateJ.cpp Sun Jun 14 20:58:10 2015 @@ -54,7 +54,7 @@ CreateJ::ConflictDescriptor(const svn_wc return NULL; // Create an instance of the conflict descriptor. - jclass clazz = env->FindClass(JAVA_PACKAGE "/ConflictDescriptor"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/ConflictDescriptor")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -62,16 +62,16 @@ CreateJ::ConflictDescriptor(const svn_wc if (ctor == 0) { ctor = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;" - "L"JAVA_PACKAGE"/ConflictDescriptor$Kind;" - "L"JAVA_PACKAGE"/types/NodeKind;" + JAVAHL_ARG("/ConflictDescriptor$Kind;") + JAVAHL_ARG("/types/NodeKind;") "Ljava/lang/String;ZLjava/lang/String;" - "L"JAVA_PACKAGE"/ConflictDescriptor$Action;" - "L"JAVA_PACKAGE"/ConflictDescriptor$Reason;" - "L"JAVA_PACKAGE"/ConflictDescriptor$Operation;" + JAVAHL_ARG("/ConflictDescriptor$Action;") + JAVAHL_ARG("/ConflictDescriptor$Reason;") + JAVAHL_ARG("/ConflictDescriptor$Operation;") "Ljava/lang/String;Ljava/lang/String;" "Ljava/lang/String;Ljava/lang/String;" - "L"JAVA_PACKAGE"/types/ConflictVersion;" - "L"JAVA_PACKAGE"/types/ConflictVersion;" + JAVAHL_ARG("/types/ConflictVersion;") + JAVAHL_ARG("/types/ConflictVersion;") "Ljava/lang/String;[B[B[B[B)V"); if (JNIUtil::isJavaExceptionThrown() || ctor == 0) POP_AND_RETURN_NULL; @@ -177,7 +177,7 @@ CreateJ::ConflictVersion(const svn_wc_co return NULL; // Create an instance of the conflict version. - jclass clazz = env->FindClass(JAVA_PACKAGE "/types/ConflictVersion"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/types/ConflictVersion")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -187,7 +187,7 @@ CreateJ::ConflictVersion(const svn_wc_co ctor = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;" "Ljava/lang/String;J" "Ljava/lang/String;" - "L"JAVA_PACKAGE"/types/NodeKind;" + JAVAHL_ARG("/types/NodeKind;") ")V"); if (JNIUtil::isJavaExceptionThrown() || ctor == 0) POP_AND_RETURN_NULL; @@ -228,7 +228,7 @@ CreateJ::Checksum(const svn_checksum_t * if (JNIUtil::isJavaExceptionThrown()) return NULL; - jclass clazz = env->FindClass(JAVA_PACKAGE"/types/Checksum"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/types/Checksum")); if (JNIUtil::isExceptionThrown()) POP_AND_RETURN_NULL; @@ -238,7 +238,7 @@ CreateJ::Checksum(const svn_checksum_t * { midConstructor = env->GetMethodID(clazz, "<init>", "([B" - "L"JAVA_PACKAGE"/types/Checksum$Kind;" + JAVAHL_ARG("/types/Checksum$Kind;") ")V"); if (JNIUtil::isExceptionThrown()) POP_AND_RETURN_NULL; @@ -273,7 +273,7 @@ CreateJ::DirEntry(const char *path, cons if (JNIUtil::isJavaExceptionThrown()) return SVN_NO_ERROR; - jclass clazz = env->FindClass(JAVA_PACKAGE"/types/DirEntry"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/types/DirEntry")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -282,7 +282,7 @@ CreateJ::DirEntry(const char *path, cons { mid = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;Ljava/lang/String;" - "L"JAVA_PACKAGE"/types/NodeKind;" + JAVAHL_ARG("/types/NodeKind;") "JZJJLjava/lang/String;)V"); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -327,7 +327,7 @@ CreateJ::Info(const char *path, const sv if (JNIUtil::isJavaExceptionThrown()) return NULL; - jclass clazz = env->FindClass(JAVA_PACKAGE "/types/Info"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/types/Info")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -337,15 +337,16 @@ CreateJ::Info(const char *path, const sv mid = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;Ljava/lang/String;" "Ljava/lang/String;J" - "L"JAVA_PACKAGE"/types/NodeKind;" + JAVAHL_ARG("/types/NodeKind;") "Ljava/lang/String;Ljava/lang/String;" "JJLjava/lang/String;" - "L"JAVA_PACKAGE"/types/Lock;Z" - "L"JAVA_PACKAGE"/types/Info$ScheduleKind;" + JAVAHL_ARG("/types/Lock;Z") + JAVAHL_ARG("/types/Info$ScheduleKind;") "Ljava/lang/String;JJ" - "L"JAVA_PACKAGE"/types/Checksum;" + JAVAHL_ARG("/types/Checksum;") "Ljava/lang/String;JJ" - "L"JAVA_PACKAGE"/types/Depth;Ljava/util/Set;)V"); + JAVAHL_ARG("/types/Depth;Ljava/util/Set;") + ")V"); if (mid == 0 || JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; } @@ -472,7 +473,7 @@ CreateJ::Lock(const svn_lock_t *lock) if (JNIUtil::isJavaExceptionThrown()) return NULL; - jclass clazz = env->FindClass(JAVA_PACKAGE"/types/Lock"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/types/Lock")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -586,7 +587,7 @@ CreateJ::ChangedPath(const char *path, s if (JNIUtil::isJavaExceptionThrown()) return NULL; - jclass clazzCP = env->FindClass(JAVA_PACKAGE"/types/ChangePath"); + jclass clazzCP = env->FindClass(JAVAHL_CLASS("/types/ChangePath")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -596,10 +597,11 @@ CreateJ::ChangedPath(const char *path, s midCP = env->GetMethodID(clazzCP, "<init>", "(Ljava/lang/String;JLjava/lang/String;" - "L"JAVA_PACKAGE"/types/ChangePath$Action;" - "L"JAVA_PACKAGE"/types/NodeKind;" - "L"JAVA_PACKAGE"/types/Tristate;" - "L"JAVA_PACKAGE"/types/Tristate;)V"); + JAVAHL_ARG("/types/ChangePath$Action;") + JAVAHL_ARG("/types/NodeKind;") + JAVAHL_ARG("/types/Tristate;") + JAVAHL_ARG("/types/Tristate;") + ")V"); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; } @@ -647,7 +649,7 @@ CreateJ::Status(svn_wc_context_t *wc_ctx if (JNIUtil::isJavaExceptionThrown()) return NULL; - jclass clazz = env->FindClass(JAVA_PACKAGE"/types/Status"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/types/Status")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -656,18 +658,18 @@ CreateJ::Status(svn_wc_context_t *wc_ctx { mid = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;Ljava/lang/String;" - "L"JAVA_PACKAGE"/types/NodeKind;" + JAVAHL_ARG("/types/NodeKind;") "JJJLjava/lang/String;" - "L"JAVA_PACKAGE"/types/Status$Kind;" - "L"JAVA_PACKAGE"/types/Status$Kind;" - "L"JAVA_PACKAGE"/types/Status$Kind;" - "L"JAVA_PACKAGE"/types/Status$Kind;" - "L"JAVA_PACKAGE"/types/Status$Kind;" - "L"JAVA_PACKAGE"/types/Status$Kind;" - "ZZL"JAVA_PACKAGE"/types/Depth;" - "ZZZL"JAVA_PACKAGE"/types/Lock;" - "L"JAVA_PACKAGE"/types/Lock;" - "JJL"JAVA_PACKAGE"/types/NodeKind;" + JAVAHL_ARG("/types/Status$Kind;") + JAVAHL_ARG("/types/Status$Kind;") + JAVAHL_ARG("/types/Status$Kind;") + JAVAHL_ARG("/types/Status$Kind;") + JAVAHL_ARG("/types/Status$Kind;") + JAVAHL_ARG("/types/Status$Kind;") + "ZZ" JAVAHL_ARG("/types/Depth;") + "ZZZ" JAVAHL_ARG("/types/Lock;") + JAVAHL_ARG("/types/Lock;") + "JJ" JAVAHL_ARG("/types/NodeKind;") "Ljava/lang/String;Ljava/lang/String;" "Ljava/lang/String;Ljava/lang/String;)V"); if (JNIUtil::isJavaExceptionThrown()) @@ -790,7 +792,7 @@ CreateJ::ClientNotifyInformation(const s return NULL; static jmethodID midCT = 0; - jclass clazz = env->FindClass(JAVA_PACKAGE"/ClientNotifyInformation"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/ClientNotifyInformation")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -798,16 +800,16 @@ CreateJ::ClientNotifyInformation(const s { midCT = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;" - "L"JAVA_PACKAGE"/ClientNotifyInformation$Action;" - "L"JAVA_PACKAGE"/types/NodeKind;" + JAVAHL_ARG("/ClientNotifyInformation$Action;") + JAVAHL_ARG("/types/NodeKind;") "Ljava/lang/String;" - "L"JAVA_PACKAGE"/types/Lock;" + JAVAHL_ARG("/types/Lock;") "Ljava/lang/String;Ljava/util/List;" - "L"JAVA_PACKAGE"/ClientNotifyInformation$Status;" - "L"JAVA_PACKAGE"/ClientNotifyInformation$Status;" - "L"JAVA_PACKAGE"/ClientNotifyInformation$LockStatus;" + JAVAHL_ARG("/ClientNotifyInformation$Status;") + JAVAHL_ARG("/ClientNotifyInformation$Status;") + JAVAHL_ARG("/ClientNotifyInformation$LockStatus;") "JLjava/lang/String;" - "L"JAVA_PACKAGE"/types/RevisionRange;" + JAVAHL_ARG("/types/RevisionRange;") "Ljava/lang/String;" "Ljava/lang/String;Ljava/lang/String;" "Ljava/util/Map;JJJJJJI)V"); @@ -923,16 +925,16 @@ CreateJ::ReposNotifyInformation(const sv return NULL; static jmethodID midCT = 0; - jclass clazz = env->FindClass(JAVA_PACKAGE"/ReposNotifyInformation"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/ReposNotifyInformation")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; if (midCT == 0) { midCT = env->GetMethodID(clazz, "<init>", - "(L"JAVA_PACKAGE"/ReposNotifyInformation$Action;" + "(" JAVAHL_ARG("/ReposNotifyInformation$Action;") "JLjava/lang/String;JJJ" - "L"JAVA_PACKAGE"/ReposNotifyInformation$NodeAction;" + JAVAHL_ARG("/ReposNotifyInformation$NodeAction;") "Ljava/lang/String;)V"); if (JNIUtil::isJavaExceptionThrown() || midCT == 0) POP_AND_RETURN_NULL; @@ -981,7 +983,7 @@ CreateJ::CommitItem(svn_client_commit_it if (JNIUtil::isJavaExceptionThrown()) return NULL; - jclass clazz = env->FindClass(JAVA_PACKAGE"/CommitItem"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/CommitItem")); if (JNIUtil::isExceptionThrown()) POP_AND_RETURN_NULL; @@ -991,7 +993,7 @@ CreateJ::CommitItem(svn_client_commit_it { midConstructor = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;" - "L"JAVA_PACKAGE"/types/NodeKind;" + JAVAHL_ARG("/types/NodeKind;") "ILjava/lang/String;" "Ljava/lang/String;J" "Ljava/lang/String;)V"); @@ -1063,7 +1065,7 @@ CreateJ::CommitInfo(const svn_commit_inf return NULL; static jmethodID midCT = 0; - jclass clazz = env->FindClass(JAVA_PACKAGE"/CommitInfo"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/CommitInfo")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -1158,17 +1160,18 @@ void fill_property_map(jobject map, if (JNIUtil::isJavaExceptionThrown()) return; - jbyteArray jpropVal = (!val ? NULL - : JNIUtil::makeJByteArray(val)); + jbyteArray jpropVal = (val ? JNIUtil::makeJByteArray(val) : NULL); if (JNIUtil::isJavaExceptionThrown()) return; - m_env->CallObjectMethod(m_map, m_put_mid, jpropName, jpropVal); + jobject ret = m_env->CallObjectMethod(m_map, m_put_mid, + jpropName, jpropVal); if (JNIUtil::isJavaExceptionThrown()) return; - m_env->DeleteLocalRef(jpropName); + m_env->DeleteLocalRef(ret); m_env->DeleteLocalRef(jpropVal); + m_env->DeleteLocalRef(jpropName); } JNIEnv*& m_env; @@ -1214,6 +1217,7 @@ void fill_property_map(jobject map, POP_AND_RETURN_NOTHING(); } } + POP_AND_RETURN_NOTHING(); } jobject property_map(apr_hash_t *prop_hash, apr_array_header_t* prop_diffs, @@ -1322,7 +1326,7 @@ jobject CreateJ::InheritedProps(apr_arra } jclass item_cls = env->FindClass( - JAVA_PACKAGE"/callback/InheritedProplistCallback$InheritedItem"); + JAVAHL_CLASS("/callback/InheritedProplistCallback$InheritedItem")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN_NULL; @@ -1375,7 +1379,7 @@ jobject CreateJ::Mergeinfo(svn_mergeinfo // Transform mergeinfo into Java Mergeinfo object. JNIEnv *env = JNIUtil::getEnv(); - jclass clazz = env->FindClass(JAVA_PACKAGE "/types/Mergeinfo"); + jclass clazz = env->FindClass(JAVAHL_CLASS("/types/Mergeinfo")); if (JNIUtil::isJavaExceptionThrown()) return NULL; Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/Credential.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/Credential.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/Credential.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/Credential.cpp Sun Jun 14 20:58:10 2015 @@ -29,17 +29,17 @@ namespace JavaHL { // Class JavaHL::Credential const char* const Credential::m_class_name = - JAVA_PACKAGE"/SVNUtil$Credential"; + JAVAHL_CLASS("/SVNUtil$Credential"); Credential::ClassImpl::ClassImpl(::Java::Env env, jclass cls) : ::Java::Object::ClassImpl(env, cls), m_mid_ctor( env.GetMethodID(cls, "<init>", - "(L"JAVA_PACKAGE"/SVNUtil$Credential$Kind;" + "(" JAVAHL_ARG("/SVNUtil$Credential$Kind;") "Ljava/lang/String;Ljava/lang/String;" "Ljava/lang/String;Ljava/lang/String;" - "L"JAVA_PACKAGE"/callback/AuthnCallback$SSLServerCertInfo;" - "L"JAVA_PACKAGE"/callback/AuthnCallback$SSLServerCertFailures;" + JAVAHL_ARG("/callback/AuthnCallback$SSLServerCertInfo;") + JAVAHL_ARG("/callback/AuthnCallback$SSLServerCertFailures;") "Ljava/lang/String;)V")) {} @@ -62,14 +62,14 @@ Credential::Credential(::Java::Env env, // Enum JavaHL::Credential::Kind const char* const Credential::Kind::m_class_name = - JAVA_PACKAGE"/SVNUtil$Credential$Kind"; + JAVAHL_CLASS("/SVNUtil$Credential$Kind"); Credential::Kind::ClassImpl::ClassImpl(::Java::Env env, jclass cls) : ::Java::Object::ClassImpl(env, cls), m_static_mid_from_string( env.GetStaticMethodID(cls, "fromString", "(Ljava/lang/String;)" - "L"JAVA_PACKAGE"/SVNUtil$Credential$Kind;")) + JAVAHL_ARG("/SVNUtil$Credential$Kind;"))) {} Credential::Kind::ClassImpl::~ClassImpl() {} Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/DiffSummaryReceiver.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/DiffSummaryReceiver.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/DiffSummaryReceiver.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/DiffSummaryReceiver.cpp Sun Jun 14 20:58:10 2015 @@ -69,12 +69,12 @@ DiffSummaryReceiver::onSummary(const svn if (callback == 0) { // Initialize the method ID. - clazz = env->FindClass(JAVA_PACKAGE "/callback/DiffSummaryCallback"); + clazz = env->FindClass(JAVAHL_CLASS("/callback/DiffSummaryCallback")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN(SVN_NO_ERROR); callback = env->GetMethodID(clazz, "onSummary", - "(L"JAVA_PACKAGE"/DiffSummary;)V"); + "(" JAVAHL_ARG("/DiffSummary;") ")V"); if (JNIUtil::isJavaExceptionThrown() || callback == 0) POP_AND_RETURN(SVN_NO_ERROR); } @@ -82,7 +82,7 @@ DiffSummaryReceiver::onSummary(const svn // Do some prep work for tranforming the DIFF parameter into a // Java equivalent. static jmethodID ctor = 0; - clazz = env->FindClass(JAVA_PACKAGE "/DiffSummary"); + clazz = env->FindClass(JAVAHL_CLASS("/DiffSummary")); if (JNIUtil::isJavaExceptionThrown()) POP_AND_RETURN(SVN_NO_ERROR); @@ -90,8 +90,8 @@ DiffSummaryReceiver::onSummary(const svn { ctor = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;" - "L"JAVA_PACKAGE"/DiffSummary$DiffKind;Z" - "L"JAVA_PACKAGE"/types/NodeKind;)V"); + JAVAHL_ARG("/DiffSummary$DiffKind;") "Z" + JAVAHL_ARG("/types/NodeKind;") ")V"); if (JNIUtil::isJavaExceptionThrown() || ctor == 0) POP_AND_RETURN(SVN_NO_ERROR); } @@ -117,8 +117,5 @@ DiffSummaryReceiver::onSummary(const svn // Invoke the Java DiffSummaryReceiver callback. env->CallVoidMethod(m_receiver, callback, jDiffSummary); - // We return whether an exception was thrown or not. - - env->PopLocalFrame(NULL); - return SVN_NO_ERROR; + POP_AND_RETURN_EXCEPTION_AS_SVNERROR(); } Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/EditorCallbacks.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/EditorCallbacks.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/EditorCallbacks.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/EditorCallbacks.cpp Sun Jun 14 20:58:10 2015 @@ -34,23 +34,22 @@ namespace JavaHL { // class JavaHL::ProvideBaseCallback const char* const ProvideBaseCallback::m_class_name = - JAVA_PACKAGE"/ISVNEditor$ProvideBaseCallback"; + JAVAHL_CLASS("/ISVNEditor$ProvideBaseCallback"); ProvideBaseCallback::ClassImpl::ClassImpl(::Java::Env env, jclass cls) : ::Java::Object::ClassImpl(env, cls), m_mid_get_contents( - env.GetMethodID(cls, - "getContents", - "(Ljava/lang/String;)" - "L"JAVA_PACKAGE - "/ISVNEditor$ProvideBaseCallback$ReturnValue;")) + env.GetMethodID( + cls, "getContents", + "(Ljava/lang/String;)" + JAVAHL_ARG("/ISVNEditor$ProvideBaseCallback$ReturnValue;"))) {} ProvideBaseCallback::ClassImpl::~ClassImpl() {} const char* const ProvideBaseCallback::ReturnValue::m_class_name = - JAVA_PACKAGE"/ISVNEditor$ProvideBaseCallback$ReturnValue"; + JAVAHL_CLASS("/ISVNEditor$ProvideBaseCallback$ReturnValue"); ProvideBaseCallback::ReturnValue::ClassImpl::ClassImpl( ::Java::Env env, jclass cls) @@ -73,23 +72,22 @@ ProvideBaseCallback::ReturnValue::get_gl // class JavaHL::ProvidePropsCallback const char* const ProvidePropsCallback::m_class_name = - JAVA_PACKAGE"/ISVNEditor$ProvidePropsCallback"; + JAVAHL_CLASS("/ISVNEditor$ProvidePropsCallback"); ProvidePropsCallback::ClassImpl::ClassImpl(::Java::Env env, jclass cls) : ::Java::Object::ClassImpl(env, cls), m_mid_get_props( - env.GetMethodID(cls, - "getProperties", - "(Ljava/lang/String;)" - "L"JAVA_PACKAGE - "/ISVNEditor$ProvidePropsCallback$ReturnValue;")) + env.GetMethodID( + cls, "getProperties", + "(Ljava/lang/String;)" + JAVAHL_ARG("/ISVNEditor$ProvidePropsCallback$ReturnValue;"))) {} ProvidePropsCallback::ClassImpl::~ClassImpl() {} const char* const ProvidePropsCallback::ReturnValue::m_class_name = - JAVA_PACKAGE"/ISVNEditor$ProvidePropsCallback$ReturnValue"; + JAVAHL_CLASS("/ISVNEditor$ProvidePropsCallback$ReturnValue"); ProvidePropsCallback::ReturnValue::ClassImpl::ClassImpl( ::Java::Env env, jclass cls) @@ -111,7 +109,7 @@ ProvidePropsCallback::ReturnValue::get_p // class JavaHL::GetNodeKindCallback const char* const GetNodeKindCallback::m_class_name = - JAVA_PACKAGE"/ISVNEditor$GetNodeKindCallback"; + JAVAHL_CLASS("/ISVNEditor$GetNodeKindCallback"); GetNodeKindCallback::ClassImpl::ClassImpl(::Java::Env env, jclass cls) : ::Java::Object::ClassImpl(env, cls), @@ -119,7 +117,7 @@ GetNodeKindCallback::ClassImpl::ClassImp env.GetMethodID(cls, "getKind", "(Ljava/lang/String;J)" - "L"JAVA_PACKAGE"/types/NodeKind;")) + JAVAHL_ARG("/types/NodeKind;"))) {} GetNodeKindCallback::ClassImpl::~ClassImpl() {} Modified: subversion/branches/fsx-1.10/subversion/bindings/javahl/native/EditorProxy.cpp URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/bindings/javahl/native/EditorProxy.cpp?rev=1685464&r1=1685463&r2=1685464&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/bindings/javahl/native/EditorProxy.cpp (original) +++ subversion/branches/fsx-1.10/subversion/bindings/javahl/native/EditorProxy.cpp Sun Jun 14 20:58:10 2015 @@ -20,7 +20,7 @@ * ==================================================================== * @endcopyright * - * @file EditorProxy.h + * @file EditorProxy.cpp * @brief Interface of all editor proxy classes */ #include <apr_pools.h> @@ -123,7 +123,7 @@ get_editor_method(jmethodID& mid, const return SVN_NO_ERROR; // Already known. JNIEnv* env = JNIUtil::getEnv(); - jclass cls = env->FindClass(JAVA_PACKAGE"/ISVNEditor"); + jclass cls = env->FindClass(JAVAHL_CLASS("/ISVNEditor")); SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); SVN_JNI_CATCH(mid = env->GetMethodID(cls, name, sig), SVN_ERR_RA_SVN_EDIT_ABORTED); @@ -151,29 +151,32 @@ EditorProxy::cb_add_directory(void *bato apr_pool_t *scratch_pool) { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_add_directory('%s')\n", relpath); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "addDirectory", - "(Ljava/lang/String;" - "Ljava/lang/Iterable;" - "Ljava/util/Map;J)V")); - - jstring jrelpath = JNIUtil::makeJString(relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jchildren = (!children ? NULL : CreateJ::StringSet(children)); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jprops = CreateJ::PropertyMap(props, scratch_pool); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, - jrelpath, jchildren, jprops, - jlong(replaces_rev)), - SVN_ERR_RA_SVN_EDIT_ABORTED); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep->m_valid) + return invalid_editor(); + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "addDirectory", + "(Ljava/lang/String;" + "Ljava/lang/Iterable;" + "Ljava/util/Map;J)V")); + + jstring jrelpath = JNIUtil::makeJString(relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jchildren = (!children ? NULL : CreateJ::StringSet(children)); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jprops = CreateJ::PropertyMap(props, scratch_pool); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + env.CallVoidMethod(ep->m_jeditor, mid, + jrelpath, jchildren, jprops, + jlong(replaces_rev)); + }); return SVN_NO_ERROR; } @@ -187,36 +190,37 @@ EditorProxy::cb_add_file(void *baton, apr_pool_t *scratch_pool) { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_add_file('%s')\n", relpath); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "addFile", - "(Ljava/lang/String;" - "L"JAVA_PACKAGE"/types/Checksum;" - "Ljava/io/InputStream;" - "Ljava/util/Map;J)V")); - - jstring jrelpath = JNIUtil::makeJString(relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jchecksum = CreateJ::Checksum(checksum); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jcontents = NULL; - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jprops = CreateJ::PropertyMap(props, scratch_pool); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - - if (contents != NULL) - SVN_JAVAHL_CATCH(Java::Env(), SVN_ERR_RA_SVN_EDIT_ABORTED, - jcontents = wrap_input_stream(contents)); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, - jrelpath, jchecksum, jcontents, - jprops, jlong(replaces_rev)), - SVN_ERR_RA_SVN_EDIT_ABORTED); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "addFile", + "(Ljava/lang/String;" + JAVAHL_ARG("/types/Checksum;") + "Ljava/io/InputStream;" + "Ljava/util/Map;J)V")); + + jstring jrelpath = JNIUtil::makeJString(relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jchecksum = CreateJ::Checksum(checksum); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jprops = CreateJ::PropertyMap(props, scratch_pool); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + jobject jcontents = NULL; + if (contents != NULL) + jcontents = wrap_input_stream(contents); + + env.CallVoidMethod(ep->m_jeditor, mid, + jrelpath, jchecksum, jcontents, + jprops, jlong(replaces_rev)); + }); return SVN_NO_ERROR; } @@ -229,29 +233,32 @@ EditorProxy::cb_add_symlink(void *baton, apr_pool_t *scratch_pool) { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_add_symlink('%s')\n", relpath); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "addSymlink", - "(Ljava/lang/String;" - "Ljava/lang/String;" - "Ljava/util/Map;J)V")); - - jstring jrelpath = JNIUtil::makeJString(relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jstring jtarget = JNIUtil::makeJString(target); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jprops = CreateJ::PropertyMap(props, scratch_pool); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, - jrelpath, jtarget, jprops, - jlong(replaces_rev)), - SVN_ERR_RA_SVN_EDIT_ABORTED); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "addSymlink", + "(Ljava/lang/String;" + "Ljava/lang/String;" + "Ljava/util/Map;J)V")); + + jstring jrelpath = JNIUtil::makeJString(relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jstring jtarget = JNIUtil::makeJString(target); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jprops = CreateJ::PropertyMap(props, scratch_pool); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + env.CallVoidMethod(ep->m_jeditor, mid, + jrelpath, jtarget, jprops, + jlong(replaces_rev)); + }); return SVN_NO_ERROR; } @@ -263,27 +270,30 @@ EditorProxy::cb_add_absent(void *baton, apr_pool_t *scratch_pool) { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_add_absent('%s')\n", relpath); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "addAbsent", - "(Ljava/lang/String;" - "L"JAVA_PACKAGE"/types/NodeKind;" - "J)V")); - - jstring jrelpath = JNIUtil::makeJString(relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jkind = EnumMapper::mapNodeKind(kind); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, - jrelpath, jkind, - jlong(replaces_rev)), - SVN_ERR_RA_SVN_EDIT_ABORTED); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "addAbsent", + "(Ljava/lang/String;" + JAVAHL_ARG("/types/NodeKind;") + "J)V")); + + jstring jrelpath = JNIUtil::makeJString(relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jkind = EnumMapper::mapNodeKind(kind); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + env.CallVoidMethod(ep->m_jeditor, mid, + jrelpath, jkind, + jlong(replaces_rev)); + }); return SVN_NO_ERROR; } @@ -297,29 +307,32 @@ EditorProxy::cb_alter_directory(void *ba { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_alter_directory('%s', r%lld)\n", //DEBUG: relpath, static_cast<long long>(revision)); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "alterDirectory", - "(Ljava/lang/String;J" - "Ljava/lang/Iterable;" - "Ljava/util/Map;)V")); - - jstring jrelpath = JNIUtil::makeJString(relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jchildren = (!children ? NULL : CreateJ::StringSet(children)); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jprops = CreateJ::PropertyMap(props, scratch_pool); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, - jrelpath, jlong(revision), - jchildren, jprops), - SVN_ERR_RA_SVN_EDIT_ABORTED); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "alterDirectory", + "(Ljava/lang/String;J" + "Ljava/lang/Iterable;" + "Ljava/util/Map;)V")); + + jstring jrelpath = JNIUtil::makeJString(relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jchildren = (!children ? NULL : CreateJ::StringSet(children)); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jprops = CreateJ::PropertyMap(props, scratch_pool); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + env.CallVoidMethod(ep->m_jeditor, mid, + jrelpath, jlong(revision), + jchildren, jprops); + }); return SVN_NO_ERROR; } @@ -334,36 +347,37 @@ EditorProxy::cb_alter_file(void *baton, { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_alter_file('%s', r%lld)\n", //DEBUG: relpath, static_cast<long long>(revision)); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "alterFile", - "(Ljava/lang/String;J" - "L"JAVA_PACKAGE"/types/Checksum;" - "Ljava/io/InputStream;" - "Ljava/util/Map;)V")); - - jstring jrelpath = JNIUtil::makeJString(relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jchecksum = CreateJ::Checksum(checksum); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jcontents = NULL; - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jprops = CreateJ::PropertyMap(props, scratch_pool); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - - if (contents != NULL) - SVN_JAVAHL_CATCH(Java::Env(), SVN_ERR_RA_SVN_EDIT_ABORTED, - jcontents = wrap_input_stream(contents)); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, - jrelpath, jlong(revision), - jchecksum, jcontents, jprops), - SVN_ERR_RA_SVN_EDIT_ABORTED); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "alterFile", + "(Ljava/lang/String;J" + JAVAHL_ARG("/types/Checksum;") + "Ljava/io/InputStream;" + "Ljava/util/Map;)V")); + + jstring jrelpath = JNIUtil::makeJString(relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jchecksum = CreateJ::Checksum(checksum); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jprops = CreateJ::PropertyMap(props, scratch_pool); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + jobject jcontents = NULL; + if (contents != NULL) + jcontents = wrap_input_stream(contents); + + env.CallVoidMethod(ep->m_jeditor, mid, + jrelpath, jlong(revision), + jchecksum, jcontents, jprops); + }); return SVN_NO_ERROR; } @@ -377,29 +391,32 @@ EditorProxy::cb_alter_symlink(void *bato { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_alter_symlink('%s', r%lld)\n", //DEBUG: relpath, static_cast<long long>(revision)); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "alterSymlink", - "(Ljava/lang/String;J" - "Ljava/lang/String;" - "Ljava/util/Map;)V")); - - jstring jrelpath = JNIUtil::makeJString(relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jstring jtarget = JNIUtil::makeJString(target); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jobject jprops = CreateJ::PropertyMap(props, scratch_pool); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, - jrelpath, jlong(revision), - jtarget, jprops), - SVN_ERR_RA_SVN_EDIT_ABORTED); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "alterSymlink", + "(Ljava/lang/String;J" + "Ljava/lang/String;" + "Ljava/util/Map;)V")); + + jstring jrelpath = JNIUtil::makeJString(relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jstring jtarget = JNIUtil::makeJString(target); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jobject jprops = CreateJ::PropertyMap(props, scratch_pool); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + env.CallVoidMethod(ep->m_jeditor, mid, + jrelpath, jlong(revision), + jtarget, jprops); + }); return SVN_NO_ERROR; } @@ -411,21 +428,24 @@ EditorProxy::cb_delete(void *baton, { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_delete('%s', r%lld)\n", //DEBUG: relpath, static_cast<long long>(revision)); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "delete", - "(Ljava/lang/String;J)V")); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); - jstring jrelpath = JNIUtil::makeJString(relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "delete", + "(Ljava/lang/String;J)V")); - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, jrelpath), - SVN_ERR_RA_SVN_EDIT_ABORTED); + jstring jrelpath = JNIUtil::makeJString(relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + env.CallVoidMethod(ep->m_jeditor, mid, jrelpath); + }); return SVN_NO_ERROR; } @@ -439,26 +459,29 @@ EditorProxy::cb_copy(void *baton, { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_copy('%s', r%lld, '%s')\n", //DEBUG: src_relpath, static_cast<long long>(src_revision), dst_relpath); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "copy", - "(Ljava/lang/String;J" - "Ljava/lang/String;J)V")); - - jstring jsrc_relpath = JNIUtil::makeJString(src_relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jstring jdst_relpath = JNIUtil::makeJString(dst_relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, - jsrc_relpath, jlong(src_revision), - jdst_relpath, jlong(replaces_rev)), - SVN_ERR_RA_SVN_EDIT_ABORTED); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "copy", + "(Ljava/lang/String;J" + "Ljava/lang/String;J)V")); + + jstring jsrc_relpath = JNIUtil::makeJString(src_relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jstring jdst_relpath = JNIUtil::makeJString(dst_relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + env.CallVoidMethod(ep->m_jeditor, mid, + jsrc_relpath, jlong(src_revision), + jdst_relpath, jlong(replaces_rev)); + }); return SVN_NO_ERROR; } @@ -472,26 +495,29 @@ EditorProxy::cb_move(void *baton, { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_move('%s', r%lld, '%s')\n", //DEBUG: src_relpath, static_cast<long long>(src_revision), dst_relpath); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "move", - "(Ljava/lang/String;J" - "Ljava/lang/String;J)V")); - - jstring jsrc_relpath = JNIUtil::makeJString(src_relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - jstring jdst_relpath = JNIUtil::makeJString(dst_relpath); - SVN_JNI_CATCH(,SVN_ERR_RA_SVN_EDIT_ABORTED); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid, - jsrc_relpath, jlong(src_revision), - jdst_relpath, jlong(replaces_rev)), - SVN_ERR_RA_SVN_EDIT_ABORTED); + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "move", + "(Ljava/lang/String;J" + "Ljava/lang/String;J)V")); + + jstring jsrc_relpath = JNIUtil::makeJString(src_relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + jstring jdst_relpath = JNIUtil::makeJString(dst_relpath); + SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env); + + env.CallVoidMethod(ep->m_jeditor, mid, + jsrc_relpath, jlong(src_revision), + jdst_relpath, jlong(replaces_rev)); + }); return SVN_NO_ERROR; } @@ -499,18 +525,21 @@ svn_error_t* EditorProxy::cb_complete(void *baton, apr_pool_t *scratch_pool) { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_complete()\n"); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); + + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + ep->m_valid = false; + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "complete", "()V")); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - ep->m_valid = false; - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "complete", "()V")); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid), - SVN_ERR_RA_SVN_EDIT_ABORTED); + env.CallVoidMethod(ep->m_jeditor, mid); + }); return SVN_NO_ERROR; } @@ -518,17 +547,20 @@ svn_error_t* EditorProxy::cb_abort(void *baton, apr_pool_t *scratch_pool) { //DEBUG:fprintf(stderr, " (n) EditorProxy::cb_abort()\n"); + const ::Java::Env env; + SVN_JAVAHL_CATCH(env, SVN_ERR_RA_SVN_EDIT_ABORTED, + { + ::Java::LocalFrame frame(env); + + EditorProxy* const ep = static_cast<EditorProxy*>(baton); + if (!ep || !ep->m_valid) + return invalid_editor(); + ep->m_valid = false; + + static jmethodID mid = 0; + SVN_ERR(get_editor_method(mid, "abort", "()V")); - EditorProxy* const ep = static_cast<EditorProxy*>(baton); - if (!ep || !ep->m_valid) - return invalid_editor(); - ep->m_valid = false; - - static jmethodID mid = 0; - SVN_ERR(get_editor_method(mid, "abort", "()V")); - - SVN_JNI_CATCH( - JNIUtil::getEnv()->CallVoidMethod(ep->m_jeditor, mid), - SVN_ERR_RA_SVN_EDIT_ABORTED); + env.CallVoidMethod(ep->m_jeditor, mid); + }); return SVN_NO_ERROR; }
