You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2011/04/15 11:56:53 UTC

svn commit: r1092646 - in /commons/sandbox/runtime/trunk/src/main: java/org/apache/commons/runtime/ java/org/apache/commons/runtime/platform/unix/ java/org/apache/commons/runtime/platform/windows/ native/os/unix/ native/os/win32/

Author: mturk
Date: Fri Apr 15 09:56:52 2011
New Revision: 1092646

URL: http://svn.apache.org/viewvc?rev=1092646&view=rev
Log:
Axe implementation factories

Removed:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SemaphoreImplFactory.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/unix/PosixSemaphoreImplFactory.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/platform/windows/WindowsSemaphoreImplFactory.java
Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Semaphore.java
    commons/sandbox/runtime/trunk/src/main/native/os/unix/semaphore.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/semaphore.c

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Semaphore.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Semaphore.java?rev=1092646&r1=1092645&r2=1092646&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Semaphore.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Semaphore.java Fri Apr 15 09:56:52 2011
@@ -33,11 +33,11 @@ public abstract class Semaphore
     }
 
     private static final  SemaphoreImpl impl;
-    private static native SemaphoreImplFactory getImplFactory()
+    private static native SemaphoreImpl impl0()
         throws OutOfMemoryError;
 
     static {
-        impl = getImplFactory().createSemaphoreImpl();
+        impl = impl0();
     }
 
     protected String  name;

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/semaphore.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/semaphore.c?rev=1092646&r1=1092645&r2=1092646&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/semaphore.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/semaphore.c Fri Apr 15 09:56:52 2011
@@ -38,7 +38,7 @@ J_DECLARE_CLAZZ = {
     0,
     0,
     0,
-   ACR_UNX_CP "PosixSemaphoreImplFactory"
+   ACR_UNX_CP "PosixSemaphoreImpl"
 };
 
 J_DECLARE_M_ID(0000) = {
@@ -47,12 +47,12 @@ J_DECLARE_M_ID(0000) = {
     "()V"
 };
 
-ACR_JNI_EXPORT(jobject, Semaphore, getImplFactory)(JNI_STDARGS)
+ACR_JNI_EXPORT(jobject, Semaphore, impl0)(JNI_STDARGS)
 {
     if (_clazzn.u == 1)
         return (*env)->NewObject(env, _clazzn.i, J4MID(0000));    
     if (AcrLoadClass(env, &_clazzn, 0) != 0) {
-        ACR_THROW_MSG(ACR_EX_EINSTANCE, "PosixSemaphoreImplFactory not initialized");
+        ACR_THROW_MSG(ACR_EX_EINSTANCE, "PosixSemaphoreImpl not initialized");
         return 0;
     }
     R_LOAD_METHOD(0000, 0);

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/semaphore.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/semaphore.c?rev=1092646&r1=1092645&r2=1092646&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/semaphore.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/semaphore.c Fri Apr 15 09:56:52 2011
@@ -24,7 +24,7 @@ J_DECLARE_CLAZZ = {
     0,
     0,
     0,
-    ACR_WIN_CP "WindowsSemaphoreImplFactory"
+    ACR_WIN_CP "WindowsSemaphoreImpl"
 };
 
 J_DECLARE_M_ID(0000) = {
@@ -33,12 +33,12 @@ J_DECLARE_M_ID(0000) = {
     "()V"
 };
 
-ACR_JNI_EXPORT(jobject, Semaphore, getImplFactory)(JNI_STDARGS)
+ACR_JNI_EXPORT(jobject, Semaphore, impl0)(JNI_STDARGS)
 {
     if (_clazzn.u == 1)
         return (*env)->NewObject(env, _clazzn.i, J4MID(0000));    
     if (AcrLoadClass(env, &_clazzn, 0) != 0) {
-        ACR_THROW_MSG(ACR_EX_EINSTANCE, "WindowsSemaphoreImplFactory not initialized");
+        ACR_THROW_MSG(ACR_EX_EINSTANCE, "WindowsSemaphoreImpl not initialized");
         return 0;
     }
     R_LOAD_METHOD(0000, 0);