subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1525922 - in /subversion/trunk/subversion/bindings/javahl/src/org: apache/subversion/javahl/remote/ apache/subversion/javahl/types/ apache/subversion/javahl/util/ tigris/subversion/javahl/
Date Tue, 24 Sep 2013 15:24:58 GMT
Author: brane
Date: Tue Sep 24 15:24:58 2013
New Revision: 1525922

URL: http://svn.apache.org/r1525922
Log:
Add static code to load the native library to all JavaHL classes that
have native methods.

[in subversion/bindings/javahl/src/org/apache/subversion/javahl]
* remote/CommitEditor.java, remote/RemoteSession.java,
  remote/StateReporter.java, types/RevisionRangeList.java,
  types/Version.java, types/VersionExtended.java,
  util/ConfigImpl.java: Load native library in static init block.
* Path.java: Remove the static init block, the class has no native methods.

Modified:
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StateReporter.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Version.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java
    subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigImpl.java
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java?rev=1525922&r1=1525921&r2=1525922&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java
Tue Sep 24 15:24:58 2013
@@ -29,6 +29,7 @@ import org.apache.subversion.javahl.call
 import org.apache.subversion.javahl.ISVNEditor;
 import org.apache.subversion.javahl.JNIObject;
 import org.apache.subversion.javahl.ClientException;
+import org.apache.subversion.javahl.NativeResources;
 
 import java.io.InputStream;
 import java.util.Map;
@@ -40,6 +41,14 @@ import java.util.Set;
  */
 public class CommitEditor extends JNIObject implements ISVNEditor
 {
+    /**
+     * Load the required native library.
+     */
+    static
+    {
+        NativeResources.loadNativeLibrary();
+    }
+
     public void dispose()
     {
         session.disposeEditor(this);

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java?rev=1525922&r1=1525921&r2=1525922&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
Tue Sep 24 15:24:58 2013
@@ -32,6 +32,7 @@ import org.apache.subversion.javahl.ISVN
 import org.apache.subversion.javahl.JNIObject;
 import org.apache.subversion.javahl.OperationContext;
 import org.apache.subversion.javahl.ClientException;
+import org.apache.subversion.javahl.NativeResources;
 
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
@@ -46,6 +47,14 @@ import static java.util.concurrent.TimeU
 
 public class RemoteSession extends JNIObject implements ISVNRemote
 {
+    /**
+     * Load the required native library.
+     */
+    static
+    {
+        NativeResources.loadNativeLibrary();
+    }
+
     public void dispose()
     {
         if (editorReference != null)

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StateReporter.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StateReporter.java?rev=1525922&r1=1525921&r2=1525922&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StateReporter.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StateReporter.java
Tue Sep 24 15:24:58 2013
@@ -29,6 +29,7 @@ import org.apache.subversion.javahl.call
 import org.apache.subversion.javahl.JNIObject;
 import org.apache.subversion.javahl.ISVNReporter;
 import org.apache.subversion.javahl.ClientException;
+import org.apache.subversion.javahl.NativeResources;
 
 /**
  * Implementation of ISVNReporter.
@@ -36,6 +37,14 @@ import org.apache.subversion.javahl.Clie
  */
 public class StateReporter extends JNIObject implements ISVNReporter
 {
+    /**
+     * Load the required native library.
+     */
+    static
+    {
+        NativeResources.loadNativeLibrary();
+    }
+
     public void dispose()
     {
         session.disposeReporter(this);

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java?rev=1525922&r1=1525921&r2=1525922&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/RevisionRangeList.java
Tue Sep 24 15:24:58 2013
@@ -24,6 +24,7 @@
 package org.apache.subversion.javahl.types;
 
 import org.apache.subversion.javahl.ClientException;
+import org.apache.subversion.javahl.NativeResources;
 
 import java.util.List;
 
@@ -39,6 +40,14 @@ public class RevisionRangeList implement
     // the Java release.
     private static final long serialVersionUID = 1L;
 
+    /**
+     * Load the required native library.
+     */
+    static
+    {
+        NativeResources.loadNativeLibrary();
+    }
+
     private List<RevisionRange> ranges;
 
     /**

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Version.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Version.java?rev=1525922&r1=1525921&r2=1525922&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Version.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Version.java
Tue Sep 24 15:24:58 2013
@@ -23,6 +23,8 @@
 
 package org.apache.subversion.javahl.types;
 
+import org.apache.subversion.javahl.NativeResources;
+
 /**
  * Encapsulates version information about the underlying native
  * libraries.  Basically a wrapper for <a
@@ -31,6 +33,14 @@ package org.apache.subversion.javahl.typ
 public class Version
 {
     /**
+     * Load the required native library.
+     */
+    static
+    {
+        NativeResources.loadNativeLibrary();
+    }
+
+    /**
      * @return The full version string for the loaded JavaHL library,
      * as defined by <code>MAJOR.MINOR.PATCH INFO</code>.
      */

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java?rev=1525922&r1=1525921&r2=1525922&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/VersionExtended.java
Tue Sep 24 15:24:58 2013
@@ -23,6 +23,8 @@
 
 package org.apache.subversion.javahl.types;
 
+import org.apache.subversion.javahl.NativeResources;
+
 /**
  * Encapsulates information about the compile-time and run-time
  * properties of the Subversion libraries.
@@ -31,6 +33,14 @@ package org.apache.subversion.javahl.typ
 public class VersionExtended
 {
     /**
+     * Load the required native library.
+     */
+    static
+    {
+        NativeResources.loadNativeLibrary();
+    }
+
+    /**
      * @return The date when the libsvn_subr library was compiled, in
      * the format defined by the C standard macro #__DATE__.
      */

Modified: subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigImpl.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigImpl.java?rev=1525922&r1=1525921&r2=1525922&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigImpl.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/util/ConfigImpl.java
Tue Sep 24 15:24:58 2013
@@ -25,6 +25,7 @@ package org.apache.subversion.javahl.uti
 
 import org.apache.subversion.javahl.ISVNConfig;
 import org.apache.subversion.javahl.ClientException;
+import org.apache.subversion.javahl.NativeResources;
 
 import org.apache.subversion.javahl.types.*;
 import org.apache.subversion.javahl.callback.*;
@@ -35,6 +36,14 @@ import org.apache.subversion.javahl.call
  */
 class ConfigImpl implements ISVNConfig
 {
+    /**
+     * Load the required native library.
+     */
+    static
+    {
+        NativeResources.loadNativeLibrary();
+    }
+
     public Category config() { return this.configref; }
     public Category servers() { return this.serversref; }
 

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java?rev=1525922&r1=1525921&r2=1525922&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Path.java
Tue Sep 24 15:24:58 2013
@@ -31,14 +31,6 @@ package org.tigris.subversion.javahl;
 public class Path
 {
     /**
-     * Load the required native library.
-     */
-    static
-    {
-        org.apache.subversion.javahl.NativeResources.loadNativeLibrary();
-    }
-
-    /**
      * A valid path is a UTF-8 string without any control characters.
      *
      * @return Whether Subversion can store the path in a repository.



Mime
View raw message