subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r905866 - in /subversion/trunk: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/tigris/subversion/javahl/
Date Wed, 03 Feb 2010 01:58:46 GMT
Author: hwright
Date: Wed Feb  3 01:58:45 2010
New Revision: 905866

URL: http://svn.apache.org/viewvc?rev=905866&view=rev
Log:
JavaHL: Make o.t.s.j.Version wrap o.a.s.j.Version.

* build.conf
  (private-built-includes): Rename the generated header.

[ in subversion/bindings/javahl/ ]
* native/org_tigris_subversion_javahl_Version.cpp:
  Rename from this...

* native/org_apache_subversion_javahl_Version.cpp:
  ...to this.

* src/org/tigris/subversion/javahl/Version.java:
  Implement all the public functions as wrappers around the o.a.s.j versions.

Added:
    subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_Version.cpp
      - copied, changed from r905826, subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_Version.cpp
Removed:
    subversion/trunk/subversion/bindings/javahl/native/org_tigris_subversion_javahl_Version.cpp
Modified:
    subversion/trunk/build.conf
    subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java

Modified: subversion/trunk/build.conf
URL: http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=905866&r1=905865&r2=905866&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Wed Feb  3 01:58:45 2010
@@ -70,7 +70,7 @@
         subversion/bindings/javahl/include/org_tigris_subversion_javahl_SVNClientLogLevel.h
         subversion/bindings/javahl/include/org_tigris_subversion_javahl_ScheduleKind.h
         subversion/bindings/javahl/include/org_tigris_subversion_javahl_StatusKind.h
-        subversion/bindings/javahl/include/org_tigris_subversion_javahl_Version.h
+        subversion/bindings/javahl/include/org_apache_subversion_javahl_Version.h
 
 
 test-scripts =

Copied: subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_Version.cpp
(from r905826, subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_Version.cpp)
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_Version.cpp?p2=subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_Version.cpp&p1=subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_Version.cpp&r1=905826&r2=905866&rev=905866&view=diff
==============================================================================
    (empty)

Modified: subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java?rev=905866&r1=905865&r2=905866&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/src/org/tigris/subversion/javahl/Version.java
Wed Feb  3 01:58:45 2010
@@ -23,6 +23,8 @@
 
 package org.tigris.subversion.javahl;
 
+import org.apache.subversion.javahl.*;
+
 /**
  * Encapsulates version information about the underlying native
  * libraries.  Basically a wrapper for <a
@@ -30,6 +32,13 @@
  */
 public class Version
 {
+    private org.apache.subversion.javahl.Version aVersion;
+
+    public Version()
+    {
+        aVersion = new org.apache.subversion.javahl.Version();
+    }
+
     /**
      * @return The full version string for the loaded JavaHL library,
      * as defined by <code>MAJOR.MINOR.PATCH INFO</code>.
@@ -37,33 +46,36 @@
      */
     public String toString()
     {
-        StringBuffer version = new StringBuffer();
-        version.append(getMajor())
-            .append('.').append(getMinor())
-            .append('.').append(getPatch())
-            .append(getNumberTag())
-            .append(getTag());
-        return version.toString();
+        return aVersion.toString();
     }
 
     /**
      * @return The major version number for the loaded JavaHL library.
      * @since 1.4.0
      */
-    public native int getMajor();
+    public int getMajor()
+    {
+        return aVersion.getMajor();
+    }
 
     /**
      * @return The minor version number for the loaded JavaHL library.
      * @since 1.4.0
      */
-    public native int getMinor();
+    public int getMinor()
+    {
+        return aVersion.getMinor();
+    }
 
     /**
      * @return The patch-level version number for the loaded JavaHL
      * library.
      * @since 1.4.0
      */
-    public native int getPatch();
+    public int getPatch()
+    {
+        return aVersion.getPatch();
+    }
 
     /**
      * @return Whether the JavaHL native library version is at least
@@ -72,26 +84,6 @@
      */
     public boolean isAtLeast(int major, int minor, int patch)
     {
-        int actualMajor = getMajor();
-        int actualMinor = getMinor();
-        return ((major < actualMajor)
-                || (major == actualMajor && minor < actualMinor)
-                || (major == actualMajor && minor == actualMinor &&
-                    patch <= getPatch()));
+        return aVersion.isAtLeast(major, minor, patch);
     }
-
-    /**
-     * @return Some text further describing the library version
-     * (e.g. <code>" (r1234)"</code>, <code>" (Alpha 1)"</code>,
-     * <code>" (dev build)"</code>, etc.).
-     * @since 1.4.0
-     */
-    private native String getTag();
-
-    /**
-     * @return Some text further describing the library version
-     * (e.g. "r1234", "Alpha 1", "dev build", etc.).
-     * @since 1.4.0
-     */
-    private native String getNumberTag();
 }



Mime
View raw message