subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v...@apache.org
Subject svn commit: r1352734 - in /subversion/branches/javahl-ra/subversion/bindings/javahl: native/ src/org/apache/subversion/javahl/ra/
Date Fri, 22 Jun 2012 00:11:50 GMT
Author: vmpn
Date: Fri Jun 22 00:11:49 2012
New Revision: 1352734

URL: http://svn.apache.org/viewvc?rev=1352734&view=rev
Log:
On the javahl-ra branch:

JavaHL: Update whitespace to be compliant with project standards

[ in subversion/bindings/javahl/native ]

* org_apache_subversion_javahl_ra_SVNRa.cpp,
  org_apache_subversion_javahl_ra_SVNRaFactory.cpp,
  RaContext.h,
  RaContext.cpp,
  SVNRa.h,
  SVNRa.cpp

[ in subversion/bindings/javahl/src/org/tigris/subversion/javahl/ra/ ]

* RaContext.java,
  SVNRaFactory.java

Modified:
    subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.cpp
    subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.h
    subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.cpp
    subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.h
    subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRa.cpp
    subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRaFactory.cpp
    subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/RaContext.java
    subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/SVNRaFactory.java

Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.cpp?rev=1352734&r1=1352733&r2=1352734&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.cpp (original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.cpp Fri Jun
22 00:11:49 2012
@@ -5,7 +5,7 @@
 #define STRING_RETURN_SIGNATURE "()Ljava/lang/String;"
 
 RaContext::RaContext(jobject contextHolder, SVN::Pool &pool, jobject jconfig)
-  :RaSharedContext(pool), m_raCallbacks(NULL)
+    : RaSharedContext(pool), m_raCallbacks(NULL)
 {
   /*
    * Extract config properties
@@ -19,67 +19,67 @@ RaContext::RaContext(jobject contextHold
 
   if (midUsername == 0 || midPassword == 0 || midConfigDirectory == 0
       || midPrompt == 0)
-  {
-    jclass clazz = env->FindClass(JAVA_PACKAGE"/ra/ISVNRaConfig");
-    if (JNIUtil::isJavaExceptionThrown())
-      return;
-
-    midUsername = env->GetMethodID(clazz, "getUsername",
-        STRING_RETURN_SIGNATURE);
-    if (JNIUtil::isJavaExceptionThrown() || midUsername == 0)
-      return;
-
-    midPassword = env->GetMethodID(clazz, "getPassword",
-        STRING_RETURN_SIGNATURE);
-    if (JNIUtil::isJavaExceptionThrown() || midPassword == 0)
-      return;
-
-    midConfigDirectory = env->GetMethodID(clazz, "getConfigDirectory",
-        STRING_RETURN_SIGNATURE);
-    if (JNIUtil::isJavaExceptionThrown() || midConfigDirectory == 0)
-      return;
-
-    midPrompt = env->GetMethodID(clazz, "getPrompt",
-        "()Lorg/apache/subversion/javahl/callback/UserPasswordCallback;");
-    if (JNIUtil::isJavaExceptionThrown() || midPrompt == 0)
-      return;
+    {
+      jclass clazz = env->FindClass(JAVA_PACKAGE"/ra/ISVNRaConfig");
+      if (JNIUtil::isJavaExceptionThrown())
+        return;
+
+      midUsername = env->GetMethodID(clazz, "getUsername",
+          STRING_RETURN_SIGNATURE);
+      if (JNIUtil::isJavaExceptionThrown() || midUsername == 0)
+        return;
+
+      midPassword = env->GetMethodID(clazz, "getPassword",
+          STRING_RETURN_SIGNATURE);
+      if (JNIUtil::isJavaExceptionThrown() || midPassword == 0)
+        return;
+
+      midConfigDirectory = env->GetMethodID(clazz, "getConfigDirectory",
+          STRING_RETURN_SIGNATURE);
+      if (JNIUtil::isJavaExceptionThrown() || midConfigDirectory == 0)
+        return;
+
+      midPrompt = env->GetMethodID(clazz, "getPrompt",
+          "()Lorg/apache/subversion/javahl/callback/UserPasswordCallback;");
+      if (JNIUtil::isJavaExceptionThrown() || midPrompt == 0)
+        return;
 
-    env->DeleteLocalRef(clazz);
-  }
+      env->DeleteLocalRef(clazz);
+    }
 
   jstring jusername = (jstring) env->CallObjectMethod(jconfig, midUsername);
   if (JNIUtil::isExceptionThrown())
     return;
 
   if (jusername != NULL)
-  {
-    JNIStringHolder usernameStr(jusername);
-    if (JNIUtil::isExceptionThrown())
     {
-      return;
-    }
+      JNIStringHolder usernameStr(jusername);
+      if (JNIUtil::isExceptionThrown())
+        {
+          return;
+        }
 
-    username(usernameStr);
+      username(usernameStr);
 
-    JNIUtil::getEnv()->DeleteLocalRef(jusername);
-  }
+      JNIUtil::getEnv()->DeleteLocalRef(jusername);
+    }
 
   jstring jpassword = (jstring) env->CallObjectMethod(jconfig, midPassword);
   if (JNIUtil::isExceptionThrown())
     return;
 
   if (jpassword != NULL)
-  {
-    JNIStringHolder passwordStr(jpassword);
-    if (JNIUtil::isExceptionThrown())
     {
-      return;
-    }
+      JNIStringHolder passwordStr(jpassword);
+      if (JNIUtil::isExceptionThrown())
+        {
+          return;
+        }
 
-    password(passwordStr);
+      password(passwordStr);
 
-    JNIUtil::getEnv()->DeleteLocalRef(jpassword);
-  }
+      JNIUtil::getEnv()->DeleteLocalRef(jpassword);
+    }
 
   jstring jconfigDirectory = (jstring) env->CallObjectMethod(jconfig,
       midConfigDirectory);
@@ -88,11 +88,11 @@ RaContext::RaContext(jobject contextHold
 
   JNIStringHolder configDirectory(jconfigDirectory);
   if (JNIUtil::isExceptionThrown())
-  {
-    return;
-  }
+    {
+      return;
+    }
 
-  setConfigDirectory (configDirectory);
+  setConfigDirectory(configDirectory);
 
   JNIUtil::getEnv()->DeleteLocalRef(jconfigDirectory);
 
@@ -101,14 +101,14 @@ RaContext::RaContext(jobject contextHold
     return;
 
   if (jprompter != NULL)
-  {
-    Prompter *prompter = Prompter::makeCPrompter(jprompter);
-    if (JNIUtil::isExceptionThrown())
-      return;
+    {
+      Prompter *prompter = Prompter::makeCPrompter(jprompter);
+      if (JNIUtil::isExceptionThrown())
+        return;
 
-    setPrompt(prompter);
-    JNIUtil::getEnv()->DeleteLocalRef(jprompter);
-  }
+      setPrompt(prompter);
+      JNIUtil::getEnv()->DeleteLocalRef(jprompter);
+    }
 
   /*
    * Attach session context java object

Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.h?rev=1352734&r1=1352733&r2=1352734&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.h (original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/RaContext.h Fri Jun 22
00:11:49 2012
@@ -5,7 +5,7 @@
 
 #include "RaSharedContext.h"
 
-class RaContext : public RaSharedContext
+class RaContext: public RaSharedContext
 {
   public:
     RaContext(jobject contextHolder, SVN::Pool &pool, jobject jconfig);

Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.cpp?rev=1352734&r1=1352733&r2=1352734&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.cpp (original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.cpp Fri Jun 22 00:11:49
2012
@@ -24,15 +24,15 @@ SVNRa::SVNRa(jobject *jthis_out, jstring
 
   JNIStringHolder url(jurl);
   if (JNIUtil::isExceptionThrown())
-  {
-    return;
-  }
+    {
+      return;
+    }
 
   JNIStringHolder uuid(juuid);
   if (JNIUtil::isExceptionThrown())
-  {
-    return;
-  }
+    {
+      return;
+    }
 
   // Create java session object
   jclass clazz = env->FindClass(JAVA_CLASS_SVN_RA);
@@ -41,11 +41,11 @@ SVNRa::SVNRa(jobject *jthis_out, jstring
 
   static jmethodID ctor = 0;
   if (ctor == 0)
-  {
-    ctor = env->GetMethodID(clazz, "<init>", "(J)V");
-    if (JNIUtil::isJavaExceptionThrown())
-      return;
-  }
+    {
+      ctor = env->GetMethodID(clazz, "<init>", "(J)V");
+      if (JNIUtil::isJavaExceptionThrown())
+        return;
+    }
 
   jlong cppAddr = this->getCppAddr();
 
@@ -62,17 +62,17 @@ SVNRa::SVNRa(jobject *jthis_out, jstring
   //TODO: add corrected URL support
   SVN_JNI_ERR(
       svn_ra_open4(&m_session, NULL, url, uuid, m_context->getCallbacks(),
-          m_context->getCallbackBaton(), m_context->getConfigData(),
-          pool.getPool()),
+                   m_context->getCallbackBaton(), m_context->getConfigData(),
+                   pool.getPool()),
       );
 }
 
 SVNRa::~SVNRa()
 {
   if (m_context)
-  {
-    delete m_context;
-  }
+    {
+      delete m_context;
+    }
 }
 
 jlong

Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.h?rev=1352734&r1=1352733&r2=1352734&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.h (original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/SVNRa.h Fri Jun 22 00:11:49
2012
@@ -15,7 +15,7 @@ class SVNEditor;
 /*
  * This class wraps Ra based operations from svn_ra.h
  */
-class SVNRa : public SVNBase
+class SVNRa: public SVNBase
 {
   public:
     static SVNRa *getCppObject(jobject jthis);

Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRa.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRa.cpp?rev=1352734&r1=1352733&r2=1352734&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRa.cpp
(original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRa.cpp
Fri Jun 22 00:11:49 2012
@@ -7,10 +7,8 @@
 
 #include "svn_private_config.h"
 
-
 JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_ra_SVNRa_finalize
-(JNIEnv *env, jobject jthis)
+Java_org_apache_subversion_javahl_ra_SVNRa_finalize(JNIEnv *env, jobject jthis)
 {
   JNIEntry(SVNRa, finalize);
   SVNRa *ras = SVNRa::getCppObject(jthis);
@@ -18,8 +16,8 @@ Java_org_apache_subversion_javahl_ra_SVN
     ras->finalize();
 }
 
-JNIEXPORT void JNICALL Java_org_apache_subversion_javahl_ra_SVNRa_dispose
-(JNIEnv *env, jobject jthis)
+JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_ra_SVNRa_dispose(JNIEnv *env, jobject jthis)
 {
   JNIEntry(SVNRa, dispose);
   SVNRa *ras = SVNRa::getCppObject(jthis);
@@ -27,8 +25,9 @@ JNIEXPORT void JNICALL Java_org_apache_s
     ras->dispose(jthis);
 }
 
-JNIEXPORT jlong JNICALL Java_org_apache_subversion_javahl_ra_SVNRa_getLatestRevision
-(JNIEnv *env, jobject jthis)
+JNIEXPORT jlong JNICALL
+Java_org_apache_subversion_javahl_ra_SVNRa_getLatestRevision(JNIEnv *env,
+                                                             jobject jthis)
 {
   JNIEntry(SVNRa, getLatestRevision);
   SVNRa *ras = SVNRa::getCppObject(jthis);

Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRaFactory.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRaFactory.cpp?rev=1352734&r1=1352733&r2=1352734&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRaFactory.cpp
(original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/native/org_apache_subversion_javahl_ra_SVNRaFactory.cpp
Fri Jun 22 00:11:49 2012
@@ -8,8 +8,9 @@
 
 #include "svn_private_config.h"
 
-JNIEXPORT jobject JNICALL Java_org_apache_subversion_javahl_ra_SVNRaFactory_createRaSession
-(JNIEnv *env, jclass jclass, jstring jurl, jstring juuid, jobject jconfig)
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_ra_SVNRaFactory_createRaSession(
+    JNIEnv *env, jclass jclass, jstring jurl, jstring juuid, jobject jconfig)
 {
   //JNI macros need jthis but this is a static call
   jobject jthis = NULL;
@@ -19,7 +20,7 @@ JNIEXPORT jobject JNICALL Java_org_apach
    * Initialize ra layer if we have not done so yet
    */
   static bool initialized = false;
-  if(!initialized)
+  if (!initialized)
     {
       SVN_JNI_ERR(svn_ra_initialize(JNIUtil::getPool()), NULL);
       initialized = true;

Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/RaContext.java
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/RaContext.java?rev=1352734&r1=1352733&r2=1352734&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/RaContext.java
(original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/RaContext.java
Fri Jun 22 00:11:49 2012
@@ -26,8 +26,8 @@ package org.apache.subversion.javahl.ra;
 import org.apache.subversion.javahl.RaSharedContext;
 
 /**
- *  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 class RaContext extends RaSharedContext
 {

Modified: subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/SVNRaFactory.java
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/SVNRaFactory.java?rev=1352734&r1=1352733&r2=1352734&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/SVNRaFactory.java
(original)
+++ subversion/branches/javahl-ra/subversion/bindings/javahl/src/org/apache/subversion/javahl/ra/SVNRaFactory.java
Fri Jun 22 00:11:49 2012
@@ -48,7 +48,7 @@ public class SVNRaFactory
     /**
      * Crates RA session for a given url with provided context
      * 
-     * @param url 
+     * @param url
      *            to connect to
      * @param uuid
      *            of the remote repository, can be null if uuid check is not



Mime
View raw message