Author: vmpn
Date: Thu Jun 21 23:48:44 2012
New Revision: 1352727
URL: http://svn.apache.org/viewvc?rev=1352727&view=rev
Log:
On the javahl-ra branch:
JavaHL: Update whitespace to be compliant with project standards
[ in subversion/bindings/javahl/native ]
* SVNBase.cpp,
SVNBase.h
[ in subversion/bindings/javahl/src/org/tigris/subversion/javahl/ ]
* JNIObject.java
Modified:
subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.cpp
subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.h
subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIObject.java
Modified:
subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.cpp
URL:
http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.cpp?rev=1352727&r1=1352726&r2=1352727&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.cpp
(original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.cpp
Thu Jun 21 23:48:44 2012
@@ -42,7 +42,7 @@ jlong SVNBase::getCppAddr() const
}
jlong SVNBase::findCppAddrForJObject(jobject jthis, jfieldID *fid,
- const char *className)
+ const char *className)
{
JNIEnv *env = JNIUtil::getEnv();
@@ -50,8 +50,7 @@ jlong SVNBase::findCppAddrForJObject(job
if (*fid == 0)
{
return 0;
- }
- else
+ } else
{
jlong cppAddr = env->GetLongField(jthis, *fid);
if (JNIUtil::isJavaExceptionThrown())
@@ -84,7 +83,7 @@ void SVNBase::dispose(jobject jthis, jfi
}
inline void SVNBase::findCppAddrFieldID(jfieldID *fid, const char *className,
- JNIEnv *env)
+ JNIEnv *env)
{
if (*fid == 0)
{
@@ -105,21 +104,21 @@ jobject SVNBase::createCppBoundObject(co
// Create java session object
jclass clazz = env->FindClass(clazzName);
if (JNIUtil::isJavaExceptionThrown())
- return NULL;
+ return NULL;
static jmethodID ctor = 0;
if (ctor == 0)
- {
+ {
ctor = env->GetMethodID(clazz, "<init>", "(J)V");
if (JNIUtil::isJavaExceptionThrown())
- return NULL;
- }
+ return NULL;
+ }
jlong cppAddr = this->getCppAddr();
jobject jself = env->NewObject(clazz, ctor, cppAddr);
if (JNIUtil::isJavaExceptionThrown())
- return NULL;
+ return NULL;
return jself;
}
Modified:
subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.h
URL:
http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.h?rev=1352727&r1=1352726&r2=1352727&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.h
(original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNBase.h
Thu Jun 21 23:48:44 2012
@@ -32,72 +32,72 @@
class SVNBase
{
- public:
- SVNBase();
- virtual ~SVNBase();
-
- /**
- * Return @c this as a @c jlong.
- *
- * @since 1.4.0
- */
- jlong getCppAddr() const;
-
- /**
- * Deletes this C++ peer object, and clears the memory address of
- * the corresponding Java object @a jthis which points to it.
- *
- * @since 1.4.0
- */
- virtual void dispose(jobject jthis) = 0;
-
- /**
- * This method should never be called, as @c dispose() should be
- * called explicitly. When @c dispose() fails to be called, this
- * method assures that this C++ peer object has been enqueued for
- * deletion.
- *
- * @since 1.4.0
- */
- void finalize();
-
- protected:
- /**
- * Return the value of the @c cppAddr instance field from the @a
- * jthis Java object, or @c 0 if an error occurs, or the address
- * otherwise can't be determined. @a fid is expected to point to
- * 0 if not already known, in which case it's looked up using @a
- * className.
- *
- * @since 1.4.0
- */
- static jlong findCppAddrForJObject(jobject jthis, jfieldID *fid,
- const char *className);
-
- /**
- * Deletes @c this, then attempts to null out the @c jthis.cppAddr
- * instance field on the corresponding Java object.
- *
- * @since 1.4.0
- */
- void dispose(jobject jthis, jfieldID *fid, const char *className);
-
- /**
- * Instantiates java object attached to this base object
- */
- jobject createCppBoundObject(const char *clazzName);
-
- private:
- /**
- * If the value pointed to by @a fid is zero, find the @c jfieldID
- * for the @c cppAddr instance field of @c className.
- *
- * @since 1.4.0
- */
- static void findCppAddrFieldID(jfieldID *fid, const char *className,
- JNIEnv *env);
+ public:
+ SVNBase();
+ virtual ~SVNBase();
+
+ /**
+ * Return @c this as a @c jlong.
+ *
+ * @since 1.4.0
+ */
+ jlong getCppAddr() const;
+
+ /**
+ * Deletes this C++ peer object, and clears the memory address of
+ * the corresponding Java object @a jthis which points to it.
+ *
+ * @since 1.4.0
+ */
+ virtual void dispose(jobject jthis) = 0;
+
+ /**
+ * This method should never be called, as @c dispose() should be
+ * called explicitly. When @c dispose() fails to be called, this
+ * method assures that this C++ peer object has been enqueued for
+ * deletion.
+ *
+ * @since 1.4.0
+ */
+ void finalize();
+
+ protected:
+ /**
+ * Return the value of the @c cppAddr instance field from the @a
+ * jthis Java object, or @c 0 if an error occurs, or the address
+ * otherwise can't be determined. @a fid is expected to point to
+ * 0 if not already known, in which case it's looked up using @a
+ * className.
+ *
+ * @since 1.4.0
+ */
+ static jlong findCppAddrForJObject(jobject jthis, jfieldID *fid,
+ const char *className);
+
+ /**
+ * Deletes @c this, then attempts to null out the @c jthis.cppAddr
+ * instance field on the corresponding Java object.
+ *
+ * @since 1.4.0
+ */
+ void dispose(jobject jthis, jfieldID *fid, const char *className);
+
+ /**
+ * Instantiates java object attached to this base object
+ */
+ jobject createCppBoundObject(const char *clazzName);
+
+ private:
+ /**
+ * If the value pointed to by @a fid is zero, find the @c jfieldID
+ * for the @c cppAddr instance field of @c className.
+ *
+ * @since 1.4.0
+ */
+ static void findCppAddrFieldID(jfieldID *fid, const char *className,
+ JNIEnv *env);
-protected:
+ protected:
SVN::Pool pool;
};
Modified:
subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIObject.java
URL:
http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIObject.java?rev=1352727&r1=1352726&r2=1352727&view=diff
==============================================================================
---
subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIObject.java
(original)
+++
subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/JNIObject.java
Thu Jun 21 23:48:44 2012
@@ -24,18 +24,17 @@
package org.apache.subversion.javahl;
/**
- * This class is used internally by the JavaHL implementation and not
- * considered part part of the public API.
+ * This class is used internally by the JavaHL implementation and not
considered
+ * part part of the public API.
*/
public abstract class JNIObject
{
/**
- * slot for the address of the native peer.
- * The JNI code controls this field. If it is set to 0 then
- * underlying JNI object has been freed
+ * slot for the address of the native peer. The JNI code controls this
+ * field. If it is set to 0 then underlying JNI object has been freed
*/
protected long cppAddr;
-
+
protected JNIObject(long cppAddr)
{
this.cppAddr = cppAddr;