[jboss-cvs] JBossAS SVN: r84352 - in projects/ejb3/trunk/async-impl/src: test/java/org/jboss/ejb3/async/impl/test/cancel and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 18 00:04:28 EST 2009


Author: ALRubinger
Date: 2009-02-18 00:04:27 -0500 (Wed, 18 Feb 2009)
New Revision: 84352

Modified:
   projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/util/concurrent/ResultUnwrappingFuture.java
   projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/util/concurrent/ResultUnwrappingThreadPoolExecutor.java
   projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/PausableBlockingQueue.java
   projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/PausableProcessingAsyncContainer.java
   projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/unit/CancelAsyncTaskTestCase.java
   projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/AsyncTestUtil.java
   projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/Pojo.java
   projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/ThreadPoolAsyncContainer.java
   projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/security/unit/SecurityContextPropagationTestCase.java
   projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/simple/unit/SimpleAsyncTestCase.java
Log:
[EJBTHREE-1721] Just go crazy with the "final" keyword, been sloppy all along

Modified: projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/util/concurrent/ResultUnwrappingFuture.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/util/concurrent/ResultUnwrappingFuture.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/util/concurrent/ResultUnwrappingFuture.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -62,12 +62,12 @@
     * Delegate constructors back up to the super implementation
     */
 
-   public ResultUnwrappingFuture(Callable<V> callable)
+   public ResultUnwrappingFuture(final Callable<V> callable)
    {
       super(callable);
    }
 
-   public ResultUnwrappingFuture(Runnable runnable, V result)
+   public ResultUnwrappingFuture(final Runnable runnable, final V result)
    {
       super(runnable, result);
    }
@@ -90,7 +90,7 @@
 
       // Get the result specified by the bean provider
       final Object returnValueFromBeanProvider = super.get();
-      V wrappedValue = this.getWrappedFuture(returnValueFromBeanProvider);
+      final V wrappedValue = this.getWrappedFuture(returnValueFromBeanProvider);
 
       // Return
       return wrappedValue;
@@ -111,7 +111,7 @@
 
       // Get the result specified by the bean provider
       final Object returnValueFromBeanProvider = super.get(timeout, unit);
-      V wrappedValue = this.getWrappedFuture(returnValueFromBeanProvider);
+      final V wrappedValue = this.getWrappedFuture(returnValueFromBeanProvider);
 
       // Return
       return wrappedValue;

Modified: projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/util/concurrent/ResultUnwrappingThreadPoolExecutor.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/util/concurrent/ResultUnwrappingThreadPoolExecutor.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/main/java/org/jboss/ejb3/async/impl/util/concurrent/ResultUnwrappingThreadPoolExecutor.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -28,7 +28,6 @@
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
-
 /**
  * ResultUnwrappingThreadPoolExecutor
  *
@@ -45,8 +44,8 @@
    /**
     * Delegates to super implementation only
     */
-   public ResultUnwrappingThreadPoolExecutor(int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit unit,
-         BlockingQueue<Runnable> workQueue)
+   public ResultUnwrappingThreadPoolExecutor(final int corePoolSize, final int maxPoolSize, final long keepAliveTime,
+         final TimeUnit unit, final BlockingQueue<Runnable> workQueue)
    {
       super(corePoolSize, maxPoolSize, keepAliveTime, unit, workQueue);
    }
@@ -64,7 +63,7 @@
     */
 
    @Override
-   public <T> Future<T> submit(Callable<T> task)
+   public <T> Future<T> submit(final Callable<T> task)
    {
       if (task == null)
          throw new NullPointerException();
@@ -74,7 +73,7 @@
    }
 
    @Override
-   public <T> Future<T> submit(Runnable task, T result)
+   public <T> Future<T> submit(final Runnable task, final T result)
    {
       if (task == null)
          throw new NullPointerException();
@@ -84,7 +83,7 @@
    }
 
    @Override
-   public Future<?> submit(Runnable task)
+   public Future<?> submit(final Runnable task)
    {
       if (task == null)
          throw new NullPointerException();

Modified: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/PausableBlockingQueue.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/PausableBlockingQueue.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/PausableBlockingQueue.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -55,11 +55,11 @@
    // Instance Members ---------------------------------------------------------------||
    // --------------------------------------------------------------------------------||
 
-   private AtomicBoolean active = new AtomicBoolean(false);
+   private final AtomicBoolean active = new AtomicBoolean(false);
 
-   private BlockingQueue<E> delegate;
+   private final BlockingQueue<E> delegate;
 
-   private BlockingQueue<E> backlogQueue;
+   private final BlockingQueue<E> backlogQueue;
 
    /**
     * A reference to the current queue to be consulted in polling
@@ -144,17 +144,17 @@
    /**
     * Offers to the current queue in play
     */
-   public boolean offer(E o)
+   public boolean offer(final E o)
    {
-      BlockingQueue<E> current = this.currentQueue;
+      final BlockingQueue<E> current = this.currentQueue;
       log.info("Offering: " + o + " to " + current);
       return current.offer(o);
    }
 
    public E take() throws InterruptedException
    {
-      BlockingQueue<E> current = this.currentQueue;
-      E obj = current.take();
+      final BlockingQueue<E> current = this.currentQueue;
+      final E obj = current.take();
       log.info("Taking : " + obj);
       return obj;
    }

Modified: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/PausableProcessingAsyncContainer.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/PausableProcessingAsyncContainer.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/PausableProcessingAsyncContainer.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -44,7 +44,8 @@
    // Constructors -------------------------------------------------------------------||
    // --------------------------------------------------------------------------------||
 
-   public PausableProcessingAsyncContainer(String name, String domainName, Class<? extends T> beanClass)
+   public PausableProcessingAsyncContainer(final String name, final String domainName,
+         final Class<? extends T> beanClass)
    {
       super(name, domainName, beanClass, new ResultUnwrappingThreadPoolExecutor(3, 6, 3, TimeUnit.SECONDS,
             new PausableBlockingQueue<Runnable>(false)));

Modified: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/unit/CancelAsyncTaskTestCase.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/unit/CancelAsyncTaskTestCase.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/cancel/unit/CancelAsyncTaskTestCase.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -88,31 +88,31 @@
    public void testCancelAsyncInvocation() throws Throwable
    {
       // Make a new bean instance upon which we'll invoke
-      BeanContext<Pojo> bean = container.construct();
+      final BeanContext<Pojo> bean = container.construct();
 
       // Set the container to allow processing
       //TODO Relying on impls?
-      ThreadPoolExecutor executor = (ThreadPoolExecutor) container.getAsynchronousExecutor();
-      PausableBlockingQueue<?> queue = (PausableBlockingQueue<?>) executor.getQueue();
+      final ThreadPoolExecutor executor = (ThreadPoolExecutor) container.getAsynchronousExecutor();
+      final PausableBlockingQueue<?> queue = (PausableBlockingQueue<?>) executor.getQueue();
       queue.resume();
       log.info("Work queue is active");
 
       // Get the counter
-      Future<Integer> initialCounterFuture = (Future<Integer>) container.invoke(bean,
+      final Future<Integer> initialCounterFuture = (Future<Integer>) container.invoke(bean,
             TestConstants.METHOD_NAME_GET_COUNTER);
-      int initialCounter = initialCounterFuture.get();
+      final int initialCounter = initialCounterFuture.get();
 
       // Ensure the counter starts at 0
       TestCase.assertEquals("Counter should start at 0", 0, initialCounter);
       log.info("Got counter at start: " + initialCounter);
 
       // Increment the counter, then get the result
-      Future<Void> firstIncrementCounterFuture = (Future<Void>) container.invoke(bean,
+      final Future<Void> firstIncrementCounterFuture = (Future<Void>) container.invoke(bean,
             TestConstants.METHOD_NAME_INCREMENT_COUNTER_ASYNCHRONOUS);
       firstIncrementCounterFuture.get(); // Block until done
-      Future<Integer> firstIncrementCounterResultFuture = (Future<Integer>) container.invoke(bean,
+      final Future<Integer> firstIncrementCounterResultFuture = (Future<Integer>) container.invoke(bean,
             TestConstants.METHOD_NAME_GET_COUNTER);
-      int firstIncrementCounterResult = firstIncrementCounterResultFuture.get();
+      final int firstIncrementCounterResult = firstIncrementCounterResultFuture.get();
 
       // Ensure the counter has been incremented
       TestCase.assertEquals("Counter should have been incrememted to 1", 1, firstIncrementCounterResult);
@@ -123,16 +123,16 @@
       log.info("Work queue is paused");
 
       // Increment the counter, then get the result
-      Future<Void> secondIncrementCounterFuture = (Future<Void>) container.invoke(bean,
+      final Future<Void> secondIncrementCounterFuture = (Future<Void>) container.invoke(bean,
             TestConstants.METHOD_NAME_INCREMENT_COUNTER_ASYNCHRONOUS);
 
       // Cancel and test
-      boolean isCancelled = secondIncrementCounterFuture.cancel(true);
+      final boolean isCancelled = secondIncrementCounterFuture.cancel(true);
       TestCase.assertTrue("Request to cancel() reporting not honored", isCancelled);
       log.info("Request to cancel reports as honored");
 
       // Ensure the cancelled task reports as done
-      boolean isDone = secondIncrementCounterFuture.isDone();
+      final boolean isDone = secondIncrementCounterFuture.isDone();
       TestCase.assertTrue("Cancelled task did not report as done", isDone);
       log.info("Request to cancel reports as done");
 
@@ -141,9 +141,9 @@
       log.info("Work queue is active again");
 
       // Get the counter again, testing that it hasn't been incremented
-      Future<Integer> secondIncrementCounterResultFuture = (Future<Integer>) container.invoke(bean,
+      final Future<Integer> secondIncrementCounterResultFuture = (Future<Integer>) container.invoke(bean,
             TestConstants.METHOD_NAME_GET_COUNTER);
-      int secondIncrementCounterResult = secondIncrementCounterResultFuture.get();
+      final int secondIncrementCounterResult = secondIncrementCounterResultFuture.get();
       TestCase.assertEquals("Second call to increment counter should have been cancelled", firstIncrementCounterResult,
             secondIncrementCounterResult);
       log.info("Second call to increment counter was cancelled, counter = " + secondIncrementCounterResult);

Modified: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/AsyncTestUtil.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/AsyncTestUtil.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/AsyncTestUtil.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -39,7 +39,6 @@
  */
 public final class AsyncTestUtil
 {
-
    // --------------------------------------------------------------------------------||
    // Constructor --------------------------------------------------------------------||
    // --------------------------------------------------------------------------------||

Modified: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/Pojo.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/Pojo.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/Pojo.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -48,7 +48,7 @@
    // Instance Members ---------------------------------------------------------------||
    // --------------------------------------------------------------------------------||
 
-   public AtomicInteger counter = new AtomicInteger();
+   public final AtomicInteger counter = new AtomicInteger();
 
    // --------------------------------------------------------------------------------||
    // Business Methods ---------------------------------------------------------------||

Modified: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/ThreadPoolAsyncContainer.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/ThreadPoolAsyncContainer.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/common/ThreadPoolAsyncContainer.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -47,13 +47,13 @@
    // Constructors -------------------------------------------------------------------||
    // --------------------------------------------------------------------------------||
 
-   public ThreadPoolAsyncContainer(String name, String domainName, Class<? extends T> beanClass)
+   public ThreadPoolAsyncContainer(final String name, final String domainName, final Class<? extends T> beanClass)
    {
       this(name, domainName, beanClass, AsyncTestUtil.getDefaultAsyncExecutorService());
    }
 
-   public ThreadPoolAsyncContainer(String name, String domainName, Class<? extends T> beanClass,
-         ExecutorService asynchronousExecutor)
+   public ThreadPoolAsyncContainer(final String name, final String domainName, final Class<? extends T> beanClass,
+         final ExecutorService asynchronousExecutor)
    {
       super(name, domainName, beanClass);
       this.setAsynchronousExecutor(asynchronousExecutor);
@@ -72,7 +72,7 @@
    // Accessors / Mutators -----------------------------------------------------------||
    // --------------------------------------------------------------------------------||
 
-   public void setAsynchronousExecutor(ExecutorService asynchronousExecutor)
+   public void setAsynchronousExecutor(final ExecutorService asynchronousExecutor)
    {
       this.asynchronousExecutor = asynchronousExecutor;
    }

Modified: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/security/unit/SecurityContextPropagationTestCase.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/security/unit/SecurityContextPropagationTestCase.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/security/unit/SecurityContextPropagationTestCase.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -26,9 +26,9 @@
 import junit.framework.TestCase;
 
 import org.jboss.aspects.common.AOPDeployer;
-import org.jboss.ejb3.async.impl.test.common.ThreadPoolAsyncContainer;
 import org.jboss.ejb3.async.impl.test.common.SecurityActions;
 import org.jboss.ejb3.async.impl.test.common.TestConstants;
+import org.jboss.ejb3.async.impl.test.common.ThreadPoolAsyncContainer;
 import org.jboss.ejb3.async.impl.test.security.SecurityAwarePojo;
 import org.jboss.ejb3.interceptors.container.BeanContext;
 import org.jboss.logging.Logger;
@@ -57,7 +57,7 @@
 
    private static final Logger log = Logger.getLogger(SecurityContextPropagationTestCase.class);
 
-   private static AOPDeployer aopDeployer = new AOPDeployer(TestConstants.AOP_DEPLOYABLE_FILENAME_SIMPLE);
+   private static final AOPDeployer aopDeployer = new AOPDeployer(TestConstants.AOP_DEPLOYABLE_FILENAME_SIMPLE);
 
    private static ThreadPoolAsyncContainer<SecurityAwarePojo> container;
 
@@ -100,27 +100,27 @@
    public void testSecurityPropagation() throws Throwable
    {
       // Initialize
-      String username = "ALR";
-      String password = "Get 'er done";
+      final String username = "ALR";
+      final String password = "Get 'er done";
 
       // Make a new bean instance upon which we'll invoke
-      BeanContext<SecurityAwarePojo> bean = container.construct();
+      final BeanContext<SecurityAwarePojo> bean = container.construct();
 
       // Set a Security Context via the client
-      SecurityClient client = SecurityClientFactory.getSecurityClient();
+      final SecurityClient client = SecurityClientFactory.getSecurityClient();
       client.setSimple(username, password);
       client.login();
 
       // Get the SecurityContext for this Thread
-      SecurityContext scBefore = SecurityActions.getSecurityContext();
+      final SecurityContext scBefore = SecurityActions.getSecurityContext();
       TestCase.assertNotNull("Test is invalid as security context before invocation is null", scBefore);
 
       // Use the container to get a contracted value from the bean
-      Future<SecurityContext> futureResult = (Future<SecurityContext>) container.invoke(bean,
+      final Future<SecurityContext> futureResult = (Future<SecurityContext>) container.invoke(bean,
             METHOD_NAME_GET_SECURITY_CONTEXT);
 
       // Get the Future value
-      SecurityContext scFromInvocation = futureResult.get();
+      final SecurityContext scFromInvocation = futureResult.get();
       TestCase.assertNotNull("SecurtyContext from invocation did not propagate", scFromInvocation);
       TestCase.assertEquals("Security Context from invocation did not match that of the calling Thread", scBefore,
             scFromInvocation);

Modified: projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/simple/unit/SimpleAsyncTestCase.java
===================================================================
--- projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/simple/unit/SimpleAsyncTestCase.java	2009-02-18 04:57:25 UTC (rev 84351)
+++ projects/ejb3/trunk/async-impl/src/test/java/org/jboss/ejb3/async/impl/test/simple/unit/SimpleAsyncTestCase.java	2009-02-18 05:04:27 UTC (rev 84352)
@@ -54,7 +54,7 @@
 
    private static final Logger log = Logger.getLogger(SimpleAsyncTestCase.class);
 
-   private static AOPDeployer aopDeployer = new AOPDeployer(TestConstants.AOP_DEPLOYABLE_FILENAME_SIMPLE);
+   private static final AOPDeployer aopDeployer = new AOPDeployer(TestConstants.AOP_DEPLOYABLE_FILENAME_SIMPLE);
 
    private static ThreadPoolAsyncContainer<Pojo> container;
 
@@ -90,24 +90,25 @@
    public void testSimpleInvocation() throws Throwable
    {
       // Make a new bean instance upon which we'll invoke
-      BeanContext<Pojo> bean = container.construct();
+      final BeanContext<Pojo> bean = container.construct();
 
       // Use the container to get a contracted value from the bean
-      Future<?> futureResult = (Future<?>) container.invoke(bean, TestConstants.METHOD_NAME_GET_VALUE_ASYNCHRONOUS);
+      final Future<?> futureResult = (Future<?>) container.invoke(bean,
+            TestConstants.METHOD_NAME_GET_VALUE_ASYNCHRONOUS);
       log.info("Obtained result: " + futureResult);
 
       // Get the Future value
-      Object result = futureResult.get();
+      final Object result = futureResult.get();
 
       // Ensure the value is expected
       TestCase.assertEquals("Did not obtain expected result", Pojo.VALUE, result);
 
       // Ensure the result reports as done
-      boolean isDone = futureResult.isDone();
+      final boolean isDone = futureResult.isDone();
       TestCase.assertTrue("Completed task did not report as done", isDone);
 
       // Ensure the result does not report as cancelled
-      boolean isCancelled = futureResult.isCancelled();
+      final boolean isCancelled = futureResult.isCancelled();
       TestCase.assertFalse("Completed task reported as cancelled", isCancelled);
    }
 
@@ -122,25 +123,25 @@
    public void testVoidMethodWithAsynchronous() throws Throwable
    {
       // Make a new bean instance upon which we'll invoke
-      BeanContext<Pojo> bean = container.construct();
+      final BeanContext<Pojo> bean = container.construct();
 
       // Get the counter as it exists
-      Future<Integer> initialCounterFuture = (Future<Integer>) container.invoke(bean,
+      final Future<Integer> initialCounterFuture = (Future<Integer>) container.invoke(bean,
             TestConstants.METHOD_NAME_GET_COUNTER);
-      int initialCounter = initialCounterFuture.get();
+      final int initialCounter = initialCounterFuture.get();
 
       // Increment the counter 
-      Future<Void> incrementCounterFutureResult = (Future<Void>) container.invoke(bean,
+      final Future<Void> incrementCounterFutureResult = (Future<Void>) container.invoke(bean,
             TestConstants.METHOD_NAME_INCREMENT_COUNTER_ASYNCHRONOUS);
       TestCase.assertNotNull("void return type not intercepted as asynchronous invocation",
             incrementCounterFutureResult);
-      Object incrementedCounterResult = incrementCounterFutureResult.get();
+      final Object incrementedCounterResult = incrementCounterFutureResult.get();
       TestCase.assertNull("void return types should return null upon Future.get()", incrementedCounterResult);
 
       // Test the counter was incremented
-      Future<Integer> incrementedCounterFuture = (Future<Integer>) container.invoke(bean,
+      final Future<Integer> incrementedCounterFuture = (Future<Integer>) container.invoke(bean,
             TestConstants.METHOD_NAME_GET_COUNTER);
-      int incrementedCounter = incrementedCounterFuture.get();
+      final int incrementedCounter = incrementedCounterFuture.get();
       TestCase.assertEquals("Counter was not incremented", initialCounter + 1, incrementedCounter);
    }
 
@@ -154,10 +155,11 @@
    public void testVoidMethodUnannotated() throws Throwable
    {
       // Make a new bean instance upon which we'll invoke
-      BeanContext<Pojo> bean = container.construct();
+      final BeanContext<Pojo> bean = container.construct();
 
       // Invoke and test
-      Object shouldBeNullReturnValue = container.invoke(bean, TestConstants.METHOD_NAME_INCREMENT_COUNTER_SYNCHRONOUS);
+      final Object shouldBeNullReturnValue = container.invoke(bean,
+            TestConstants.METHOD_NAME_INCREMENT_COUNTER_SYNCHRONOUS);
       TestCase.assertNull("methods with void return type not annotated with @" + Asynchronous.class.getSimpleName()
             + " should have null return type from container invocation", shouldBeNullReturnValue);
 
@@ -173,12 +175,11 @@
    public void testUnannotatedMethodsSynchronous() throws Throwable
    {
       // Make a new bean instance upon which we'll invoke
-      BeanContext<Pojo> bean = container.construct();
+      final BeanContext<Pojo> bean = container.construct();
 
       // Invoke and test
-      String value = container.invoke(bean, TestConstants.METHOD_NAME_GET_VALUE_SYNCHRONOUS);
+      final String value = container.invoke(bean, TestConstants.METHOD_NAME_GET_VALUE_SYNCHRONOUS);
       TestCase.assertEquals("Contracted value not obtained as expected", Pojo.VALUE, value);
-
    }
 
 }




More information about the jboss-cvs-commits mailing list