~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
package org.apache.subversion.javahl;
25
25
 
26
26
import org.apache.subversion.javahl.types.Version;
 
27
import org.apache.subversion.javahl.types.RuntimeVersion;
27
28
 
28
29
/**
29
30
 * Handles activities related to management of native resouces
35
36
public class NativeResources
36
37
{
37
38
    /**
 
39
     * Version information about the underlying native libraries.
 
40
     */
 
41
    private static Version version;
 
42
 
 
43
    /**
 
44
     * Runtime version information about the loaded libsvn_client.
 
45
     */
 
46
    private static RuntimeVersion runtimeVersion;
 
47
 
 
48
    /**
38
49
     * @return Version information about the underlying native libraries.
39
50
     */
40
 
    private static Version version;
41
 
 
42
 
    /**
43
 
     * Returns version information about the underlying native libraries.
44
 
     *
45
 
     * @return version
46
 
     *
47
 
     */
48
 
    public static Version getVersion() {
 
51
    public static Version getVersion()
 
52
    {
49
53
        return version;
50
54
    }
51
55
 
52
56
    /**
 
57
     * @return Runtime version information about the loaded libsvn_client.
 
58
     */
 
59
    public static RuntimeVersion getRuntimeVersion()
 
60
    {
 
61
        return runtimeVersion;
 
62
    }
 
63
 
 
64
    /**
53
65
     * Load the required native library whose path is specified by the
54
66
     * system property <code>subversion.native.library</code> (which
55
67
     * can be passed to the JVM on start-up using an argument like
129
141
     */
130
142
    private static final void init()
131
143
    {
132
 
        initNativeLibrary();
133
144
        version = new Version();
134
 
        if (!version.isAtLeast(1, 8, 0))
 
145
        if (!version.isAtLeast(1, 9, 0))
135
146
        {
136
147
            throw new LinkageError("Native library version must be at least " +
137
 
                                   "1.8.0, but is only " + version);
 
148
                                   "1.9.0, but is only " + version);
 
149
        }
 
150
 
 
151
        runtimeVersion = new RuntimeVersion();
 
152
        if (runtimeVersion.getMajor() < version.getMajor()
 
153
            || (runtimeVersion.getMajor() == version.getMajor()
 
154
                && runtimeVersion.getMinor() < version.getMinor()))
 
155
        {
 
156
            throw new LinkageError(
 
157
                "Compile-time Native library version is " + version +
 
158
                " but the run-time version is " + runtimeVersion);
138
159
        }
139
160
    }
140
 
 
141
 
    /**
142
 
     * Initialize the native library layer.
143
 
     */
144
 
    private static native void initNativeLibrary();
145
161
}