tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject svn commit: r1607903 [3/3] - in /tomee/tomee/trunk: arquillian/arquillian-tomee-common/ arquillian/arquillian-tomee-moviefun-example/src/test/java/org/superbiz/moviefun/ arquillian/arquillian-tomee-tests/arquillian-tomee-jaxrs-tests/src/test/java/org/a...
Date Fri, 04 Jul 2014 18:29:16 GMT
Modified: tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessEjbObjectTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessEjbObjectTests.java?rev=1607903&r1=1607902&r2=1607903&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessEjbObjectTests.java
(original)
+++ tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessEjbObjectTests.java
Fri Jul  4 18:29:14 2014
@@ -32,7 +32,7 @@ public class StatelessEjbObjectTests ext
 
     protected void setUp() throws Exception{
         super.setUp();
-        Object obj = initialContext.lookup("client/tests/stateless/BasicStatelessHome");
+        final Object obj = initialContext.lookup("client/tests/stateless/BasicStatelessHome");
         ejbHome = (BasicStatelessHome)javax.rmi.PortableRemoteObject.narrow( obj, BasicStatelessHome.class);
         ejbObject = ejbHome.createObject();
     }
@@ -40,7 +40,7 @@ public class StatelessEjbObjectTests ext
     protected void tearDown() throws Exception {
         try {
             //ejbObject.remove();
-        } catch (Exception e){
+        } catch (final Exception e){
             throw e;
         } finally {
             super.tearDown();
@@ -54,7 +54,7 @@ public class StatelessEjbObjectTests ext
         try{
             ejbHandle = ejbObject.getHandle();
             assertNotNull( "The Handle is null", ejbHandle );
-        } catch (Exception e){
+        } catch (final Exception e){
             fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
         }
     }
@@ -62,16 +62,16 @@ public class StatelessEjbObjectTests ext
     public void test02_isIdentical(){
         try{
             assertTrue( "The EJBObjects are not identical", ejbObject.isIdentical(ejbObject)
);
-        } catch (Exception e){
+        } catch (final Exception e){
             fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
         }
     }
 
     public void test03_getEjbHome(){
         try{
-            EJBHome home = ejbObject.getEJBHome();
+            final EJBHome home = ejbObject.getEJBHome();
             assertNotNull( "The EJBHome is null", home );
-        } catch (Exception e){
+        } catch (final Exception e){
             fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
         }
     }
@@ -91,11 +91,11 @@ public class StatelessEjbObjectTests ext
      */
     public void test04_getPrimaryKey(){
         try{
-            Object key = ejbObject.getPrimaryKey();
-        } catch (java.rmi.RemoteException e){
+            final Object key = ejbObject.getPrimaryKey();
+        } catch (final java.rmi.RemoteException e){
             assertTrue(true);
             return;
-        } catch (Exception e){
+        } catch (final Exception e){
             fail("A RuntimeException should have been thrown.  Received Exception "+e.getClass()+
" : "+e.getMessage());
         }
         fail("A RuntimeException should have been thrown.");
@@ -106,7 +106,7 @@ public class StatelessEjbObjectTests ext
             ejbObject.remove();
             // you can't really remove a stateless handle
             ejbObject.businessMethod("Should not throw an exception");
-        } catch (Exception e){
+        } catch (final Exception e){
             fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
         }
     }
@@ -117,7 +117,7 @@ public class StatelessEjbObjectTests ext
         String str = null;
         try {
             str = ejbObject.remove("Hello");
-        } catch (RemoteException e) {
+        } catch (final RemoteException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
         }

Modified: tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessRemoteBusinessIntfcTests.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessRemoteBusinessIntfcTests.java?rev=1607903&r1=1607902&r2=1607903&view=diff
==============================================================================
--- tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessRemoteBusinessIntfcTests.java
(original)
+++ tomee/tomee/trunk/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/stateless/StatelessRemoteBusinessIntfcTests.java
Fri Jul  4 18:29:14 2014
@@ -31,7 +31,7 @@ public class StatelessRemoteBusinessIntf
     // Test remote interface methods
     //
     public void test00_lookupBusinessInterface() throws Exception {
-        Object obj = initialContext.lookup("client/tests/stateless/BasicStatelessPojoHomeBusinessRemote");
+        final Object obj = initialContext.lookup("client/tests/stateless/BasicStatelessPojoHomeBusinessRemote");
         assertNotNull(obj);
         assertTrue("instance of BasicStatelessBusinessRemote", obj instanceof BasicStatelessBusinessRemote);
         businessRemote = (BasicStatelessBusinessRemote) obj;
@@ -39,16 +39,16 @@ public class StatelessRemoteBusinessIntf
 
     public void test01_businessMethod(){
         try{
-            String expected = "Success";
+            final String expected = "Success";
             String actual = businessRemote.businessMethod("sseccuS");
             assertEquals(expected, actual);
-        } catch (Exception e){
+        } catch (final Exception e){
             fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
         }
 
         try{
             Integer expected = new Integer(42);
-            Object actual = businessRemote.echo(expected);
+            final Object actual = businessRemote.echo(expected);
             assertEquals(expected, actual);
             assertNotSame("pass by value", expected, actual);
         } catch (Exception e){
@@ -63,10 +63,10 @@ public class StatelessRemoteBusinessIntf
     public void test02_throwApplicationException(){
         try{
             businessRemote.throwApplicationException();
-        } catch (org.apache.openejb.test.ApplicationException e){
+        } catch (final org.apache.openejb.test.ApplicationException e){
             //Good.  This is the correct behaviour
             return;
-        } catch (Throwable e){
+        } catch (final Throwable e){
             fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
         }
         fail("An ApplicationException should have been thrown.");
@@ -78,7 +78,7 @@ public class StatelessRemoteBusinessIntf
      */
     public void test03_invokeAfterApplicationException(){
         try{
-            String expected = "Success";
+            final String expected = "Success";
             String actual   = businessRemote.businessMethod("sseccuS");
             assertEquals(expected, actual);
         } catch (Throwable e){
@@ -90,13 +90,13 @@ public class StatelessRemoteBusinessIntf
     public void _test04_throwSystemException(){
         try{
             businessRemote.throwSystemException_NullPointer();
-        } catch (Exception e){
+        } catch (final Exception e){
             //Good, so far.
-            Throwable n = e.getCause();
+            final Throwable n = e.getCause();
             assertNotNull("Nested exception should not be is null", n );
             assertTrue("Nested exception should be an instance of NullPointerException, but
exception is "+n.getClass().getName(), (n instanceof NullPointerException));
             return;
-        } catch (Throwable e){
+        } catch (final Throwable e){
             fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
         }
         fail("A NullPointerException should have been thrown.");
@@ -124,7 +124,7 @@ public class StatelessRemoteBusinessIntf
     //=================================
     
     public void test06_testRemove(){
-        Object obj =businessRemote.remove();
+        final Object obj =businessRemote.remove();
         assertNotNull(obj);
     }
 

Modified: tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java?rev=1607903&r1=1607902&r2=1607903&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java
(original)
+++ tomee/tomee/trunk/server/openejb-client/src/main/java/org/apache/openejb/client/Client.java
Fri Jul  4 18:29:14 2014
@@ -163,7 +163,7 @@ public class Client {
         final Connection conn;
         try {
             conn = ConnectionManager.getConnection(cluster, server, req);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new RemoteException("Unable to connect", e);
         }
 
@@ -180,7 +180,7 @@ public class Client {
 
                 out = conn.getOutputStream();
 
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw newIOException("Cannot open output stream to server: ", e);
             }
 
@@ -190,7 +190,7 @@ public class Client {
             try {
                 protocolRequest.writeExternal(out);
                 out.flush();
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw newIOException("Cannot write the protocol metadata to the server: ",
e);
             }
 
@@ -200,7 +200,7 @@ public class Client {
             final ObjectOutput objectOut;
             try {
                 objectOut = new ObjectOutputStream(out);
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw newIOException("Cannot open object output stream to server: ", e);
             }
 
@@ -210,7 +210,7 @@ public class Client {
             try {
                 server.setMetaData(protocolRequest);
                 server.writeExternal(objectOut);
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw newIOException("Cannot write the ServerMetaData to the server: ", e);
             }
 
@@ -223,7 +223,7 @@ public class Client {
                 clusterRequest.setMetaData(protocolRequest);
                 objectOut.write(clusterRequest.getRequestType().getCode());
                 clusterRequest.writeExternal(objectOut);
-            } catch (Throwable e) {
+            } catch (final Throwable e) {
                 throw newIOException("Cannot write the ClusterMetaData to the server: ",
e);
             }
 
@@ -232,7 +232,7 @@ public class Client {
             /*----------------------------------*/
             try {
                 objectOut.write(req.getRequestType().getCode());
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw newIOException("Cannot write the request type to the server: ", e);
             }
 
@@ -246,11 +246,11 @@ public class Client {
                 objectOut.flush();
                 out.flush();
 
-            } catch (java.io.NotSerializableException e) {
+            } catch (final java.io.NotSerializableException e) {
 
                 throw new IllegalArgumentException("Object is not serializable: " + e.getMessage());
 
-            } catch (IOException e) {
+            } catch (final IOException e) {
 
                 throw newIOException("Cannot write the request to the server: " + e.getMessage(),
e);
             }
@@ -263,7 +263,7 @@ public class Client {
 
                 in = conn.getInputStream();
 
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw newIOException("Cannot open input stream to server: ", e);
             }
 
@@ -273,11 +273,11 @@ public class Client {
 
                 protocolResponse.readExternal(in);
 
-            } catch (EOFException e) {
+            } catch (final EOFException e) {
 
                 throw newIOException("Prematurely reached the end of the stream.  " + protocolResponse.getSpec()
+ " : " + e.getMessage(), e);
 
-            } catch (IOException e) {
+            } catch (final IOException e) {
 
                 throw newIOException("Cannot determine server protocol version: Received
" + protocolResponse.getSpec() + " : " + e.getMessage(), e);
             }
@@ -287,7 +287,7 @@ public class Client {
 
                 objectIn = new EjbObjectInputStream(in);
 
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw newIOException("Cannot open object input stream to server (" + protocolResponse.getSpec()
+ ") : " + e.getMessage(), e);
             }
 
@@ -307,13 +307,13 @@ public class Client {
                         throw clusterResponse.getFailure();
                     }
                 }
-            } catch (ClassNotFoundException e) {
+            } catch (final ClassNotFoundException e) {
                 throw new RemoteException("Cannot read the cluster response from the server.
 The class for an object being returned is not located in this system:", e);
 
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw newIOException("Cannot read the cluster response from the server ("
+ protocolResponse.getSpec() + ") : " + e.getMessage(), e);
 
-            } catch (Throwable e) {
+            } catch (final Throwable e) {
                 throw new RemoteException("Error reading cluster response from server ("
+ protocolResponse.getSpec() + ") : " + e.getMessage(), e);
             }
 
@@ -323,13 +323,13 @@ public class Client {
             try {
                 res.setMetaData(protocolResponse);
                 res.readExternal(objectIn);
-            } catch (ClassNotFoundException e) {
+            } catch (final ClassNotFoundException e) {
                 throw new RemoteException("Cannot read the response from the server.  The
class for an object being returned is not located in this system:", e);
 
-            } catch (IOException e) {
+            } catch (final IOException e) {
                 throw newIOException("Cannot read the response from the server (" + protocolResponse.getSpec()
+ ") : " + e.getMessage(), e);
 
-            } catch (Throwable e) {
+            } catch (final Throwable e) {
                 throw new RemoteException("Error reading response from server (" + protocolResponse.getSpec()
+ ") : " + e.getMessage(), e);
             }
 
@@ -361,9 +361,9 @@ public class Client {
                 logger.log(Level.FINEST, message);
             }
 
-        } catch (RemoteException e) {
+        } catch (final RemoteException e) {
             throw e;
-        } catch (IOException e) {
+        } catch (final IOException e) {
             final URI uri = conn.getURI();
             final Set<URI> failed = getFailed();
 
@@ -381,9 +381,9 @@ public class Client {
                     Client.fireEvent(new RetryingRequest(req, server));
 
                     processRequest(req, res, server);
-                } catch (RemoteFailoverException re) {
+                } catch (final RemoteFailoverException re) {
                     throw re;
-                } catch (RemoteException re) {
+                } catch (final RemoteException re) {
                     if (e instanceof RetryException) {
                         return ((RetryException) e).getResponse();
                     }
@@ -391,7 +391,7 @@ public class Client {
                 }
             }
 
-        } catch (Throwable error) {
+        } catch (final Throwable error) {
             throw new RemoteException("Error while communicating with server: ", error);
 
         } finally {
@@ -399,7 +399,7 @@ public class Client {
             if (null != out) {
                 try {
                     out.close();
-                } catch (Throwable e) {
+                } catch (final Throwable e) {
                     //Ignore
                 }
             }
@@ -407,7 +407,7 @@ public class Client {
             if (null != in) {
                 try {
                     in.close();
-                } catch (Throwable e) {
+                } catch (final Throwable e) {
                     //Ignore
                 }
             }
@@ -415,7 +415,7 @@ public class Client {
             if (null != conn) {
                 try {
                     conn.close();
-                } catch (Throwable t) {
+                } catch (final Throwable t) {
                     logger.log(Level.WARNING, "Error closing connection with server: " +
t.getMessage(), t);
                 }
             }

Modified: tomee/tomee/trunk/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/ApplicationFromWebXmlTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/ApplicationFromWebXmlTest.java?rev=1607903&r1=1607902&r2=1607903&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/ApplicationFromWebXmlTest.java
(original)
+++ tomee/tomee/trunk/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/ApplicationFromWebXmlTest.java
Fri Jul  4 18:29:14 2014
@@ -50,7 +50,7 @@ public class ApplicationFromWebXmlTest {
 
     @Test
     public void first() {
-        String hi = WebClient.create(BASE_URL).path("/first/hi").get(String.class);
+        final String hi = WebClient.create(BASE_URL).path("/first/hi").get(String.class);
         assertEquals("Hi from REST World!", hi);
     }
 

Modified: tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FullPoolFailoverTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FullPoolFailoverTest.java?rev=1607903&r1=1607902&r2=1607903&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FullPoolFailoverTest.java
(original)
+++ tomee/tomee/trunk/server/openejb-ejbd/src/test/java/org/apache/openejb/server/ejbd/FullPoolFailoverTest.java
Fri Jul  4 18:29:14 2014
@@ -74,7 +74,7 @@ public class FullPoolFailoverTest extend
         paused = new CountingLatch(10);
 
         // Do a business method...
-        Runnable r = new Runnable() {
+        final Runnable r = new Runnable() {
             public void run() {
                 counter.hit();
             }
@@ -92,7 +92,7 @@ public class FullPoolFailoverTest extend
             if (!paused.await(3000, TimeUnit.MILLISECONDS)) {
                 System.out.println();
             }
-        } catch (Throwable t) {
+        } catch (final Throwable t) {
             System.out.println();
         }
         assertTrue("expected 10 invocations", paused.await(3000, TimeUnit.MILLISECONDS));
@@ -100,7 +100,7 @@ public class FullPoolFailoverTest extend
         assertEquals(10, CounterBean.instances.get());
         assertEquals(10, hits.size());
 
-        List<URI> expected = new ArrayList<URI>();
+        final List<URI> expected = new ArrayList<URI>();
         for (int i = 0; i < 10; i++) {
             expected.add(red);
         }
@@ -150,7 +150,7 @@ public class FullPoolFailoverTest extend
         paused = new CountingLatch(10);
 
         // Do a business method...
-        Runnable r = new Runnable() {
+        final Runnable r = new Runnable() {
             public void run() {
                 counter.hit();
             }
@@ -174,7 +174,7 @@ public class FullPoolFailoverTest extend
         assertEquals(expected, hits);
 
         // This one should failover to the blue server
-        URI uri = counter.hit();
+        final URI uri = counter.hit();
         assertEquals(blue, uri);
 
         // the red pool is fully busy, so we should have failed over to blue
@@ -187,7 +187,7 @@ public class FullPoolFailoverTest extend
         for (int i = 0; i < 10; i++) {
             paused.countUp();
             expected.add(blue);
-            Thread t = new Thread(r);
+            final Thread t = new Thread(r);
             t.start();
         }
 
@@ -215,7 +215,7 @@ public class FullPoolFailoverTest extend
     protected void tearDown() throws Exception {
         super.tearDown();
 
-        for (ServiceDaemon daemon : daemons) {
+        for (final ServiceDaemon daemon : daemons) {
             daemon.stop();
         }
 
@@ -224,7 +224,7 @@ public class FullPoolFailoverTest extend
 
     private final List<ServiceDaemon> daemons = new ArrayList<ServiceDaemon>();
 
-    protected void setup(int statelessPoolSize, int connectionPoolSize) throws Exception
{
+    protected void setup(final int statelessPoolSize, final int connectionPoolSize) throws
Exception {
         Properties initProps = new Properties();
         initProps.setProperty("openejb.deployments.classpath.include", "");
         initProps.setProperty("openejb.deployments.classpath.filter.descriptors", "true");
@@ -238,8 +238,8 @@ public class FullPoolFailoverTest extend
         daemons.add(createServiceDaemon(connectionPoolSize, ejbServer, red));
         daemons.add(createServiceDaemon(connectionPoolSize, ejbServer, blue));
 
-        ConfigurationFactory config = new ConfigurationFactory();
-        Assembler assembler = SystemInstance.get().getComponent(Assembler.class);
+        final ConfigurationFactory config = new ConfigurationFactory();
+        final Assembler assembler = SystemInstance.get().getComponent(Assembler.class);
 
         // containers
         StatelessSessionContainerInfo statelessContainerInfo = config.configureService(StatelessSessionContainerInfo.class);
@@ -277,11 +277,11 @@ public class FullPoolFailoverTest extend
         hits.clear();
     }
 
-    private ServiceDaemon createServiceDaemon(int poolSize, EjbServer ejbServer, URI uri)
throws ServiceException {
+    private ServiceDaemon createServiceDaemon(final int poolSize, final EjbServer ejbServer,
URI uri) throws ServiceException {
         ServiceIdentifier serviceIdentifier = new ServiceIdentifier(ejbServer, uri);
         KeepAliveServer keepAliveServer = new KeepAliveServer(serviceIdentifier);
         ServicePool pool = new ServicePool(keepAliveServer, poolSize);
-        ServiceDaemon daemon = new ServiceDaemon(pool, 0, "localhost");
+        final ServiceDaemon daemon = new ServiceDaemon(pool, 0, "localhost");
         daemon.start();
         return daemon;
     }
@@ -292,13 +292,13 @@ public class FullPoolFailoverTest extend
 
         private final URI me;
 
-        public ServiceIdentifier(ServerService service, URI me) {
+        public ServiceIdentifier(final ServerService service, URI me) {
             super(service);
             this.me = me;
         }
 
         @Override
-        public void service(InputStream in, OutputStream out) throws ServiceException, IOException
{
+        public void service(final InputStream in, OutputStream out) throws ServiceException,
IOException {
             synchronized (hits) {
                 hits.add(me);
             }
@@ -313,7 +313,7 @@ public class FullPoolFailoverTest extend
 
     public static Object lock = new Object[]{};
 
-    private static void comment(String x) {
+    private static void comment(final String x) {
         //        synchronized(lock){
         //            System.out.println(x);
         //            System.out.flush();
@@ -348,13 +348,13 @@ public class FullPoolFailoverTest extend
         }
 
         public URI hit() {
-            URI uri = host.get();
+            final URI uri = host.get();
 
             if (hold.contains(uri)) {
                 try {
                     paused.countDown();
                     resume.await();
-                } catch (InterruptedException e) {
+                } catch (final InterruptedException e) {
                     Thread.interrupted();
                 }
             }

Modified: tomee/tomee/trunk/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MultipointDiscoveryAgentTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MultipointDiscoveryAgentTest.java?rev=1607903&r1=1607902&r2=1607903&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MultipointDiscoveryAgentTest.java
(original)
+++ tomee/tomee/trunk/server/openejb-multicast/src/test/java/org/apache/openejb/server/discovery/MultipointDiscoveryAgentTest.java
Fri Jul  4 18:29:14 2014
@@ -77,14 +77,14 @@ public class MultipointDiscoveryAgentTes
         };
 
         final DiscoveryListener listener = new DiscoveryListener() {
-            public void serviceAdded(URI service) {
+            public void serviceAdded(final URI service) {
                 System.out.println("added = " + service);
                 if (testService.equals(service)) {
                     latches[0].countDown();
                 }
             }
 
-            public void serviceRemoved(URI service) {
+            public void serviceRemoved(final URI service) {
                 System.out.println("removed = " + service);
                 if (testService.equals(service)) {
                     latches[1].countDown();
@@ -97,7 +97,7 @@ public class MultipointDiscoveryAgentTes
 
         nodes.add(root);
 
-        for (String name : names) {
+        for (final String name : names) {
             final Node node = new Node(0, listener, name, root.getURI());
             nodes.add(node);
         }
@@ -119,7 +119,7 @@ public class MultipointDiscoveryAgentTes
 
             assertTrue("round=" + i + ". Remove failed", latches[1].await(60, TimeUnit.SECONDS));
 
-            for (Node node : nodes) {
+            for (final Node node : nodes) {
                 final Set<URI> services = node.getRegistry().getServices();
                 assertEquals("round=" + i + ". Service retained", 0, services.size());
             }
@@ -151,7 +151,7 @@ public class MultipointDiscoveryAgentTes
 
     }
 
-    private Node launch(Node green, String color, int port) throws Exception {
+    private Node launch(final Node green, final String color, final int port) throws Exception
{
         final URI orangeService = new URI(color + "://localhost:"+ port);
         final Node orange = new Node(port, new Listener(color), color, green.getURI());
         orange.getRegistry().registerService(orangeService);
@@ -164,11 +164,11 @@ public class MultipointDiscoveryAgentTes
         private final DiscoveryRegistry registry;
         private final String name;
 
-        public Node(int p, DiscoveryListener listener, String name, URI... uris) throws Exception
{
+        public Node(final int p, final DiscoveryListener listener, String name, URI... uris)
throws Exception {
             this(p, listener, false, name, 100, 2, uris);
         }
 
-        public Node(int p, DiscoveryListener listener, boolean debug, String name, int heartRate,
int maxMissHeartBeats, URI... uris) throws Exception {
+        public Node(final int p, final DiscoveryListener listener, final boolean debug, String
name, int heartRate, int maxMissHeartBeats, URI... uris) throws Exception {
             this.agent = new MultipointDiscoveryAgent(debug, name);
             this.name = name;
             final Properties props = new Properties();
@@ -225,15 +225,15 @@ public class MultipointDiscoveryAgentTes
             return name;
         }
 
-        private Listener(String name) {
+        private Listener(final String name) {
             this.name = name;
         }
 
-        public void serviceAdded(URI service) {
+        public void serviceAdded(final URI service) {
 //            System.out.printf("[%s] added = %s\n", name, service);
         }
 
-        public void serviceRemoved(URI service) {
+        public void serviceRemoved(final URI service) {
 //            System.out.printf("[%s] removed = %s\n", name, service);
         }
 
@@ -253,13 +253,13 @@ public class MultipointDiscoveryAgentTes
         private final Handler handler;
         private final LogRecordFilter filter;
 
-        public FilteredHandler(Handler handler, LogRecordFilter filter) {
+        public FilteredHandler(final Handler handler, LogRecordFilter filter) {
             this.handler = handler;
             this.filter = filter;
         }
 
         @Override
-        public void publish(LogRecord record) {
+        public void publish(final LogRecord record) {
             handler.publish(record);
 //            if (filter.accept(record)) {
 //            }
@@ -276,7 +276,7 @@ public class MultipointDiscoveryAgentTes
         }
 
         @Override
-        public void setFormatter(Formatter newFormatter) throws SecurityException {
+        public void setFormatter(final Formatter newFormatter) throws SecurityException {
             handler.setFormatter(newFormatter);
         }
 
@@ -286,7 +286,7 @@ public class MultipointDiscoveryAgentTes
         }
 
         @Override
-        public void setEncoding(String encoding) throws SecurityException, UnsupportedEncodingException
{
+        public void setEncoding(final String encoding) throws SecurityException, UnsupportedEncodingException
{
             handler.setEncoding(encoding);
         }
 
@@ -296,7 +296,7 @@ public class MultipointDiscoveryAgentTes
         }
 
         @Override
-        public void setFilter(Filter newFilter) throws SecurityException {
+        public void setFilter(final Filter newFilter) throws SecurityException {
             handler.setFilter(newFilter);
         }
 
@@ -306,7 +306,7 @@ public class MultipointDiscoveryAgentTes
         }
 
         @Override
-        public void setErrorManager(ErrorManager em) {
+        public void setErrorManager(final ErrorManager em) {
             handler.setErrorManager(em);
         }
 
@@ -316,7 +316,7 @@ public class MultipointDiscoveryAgentTes
         }
 
         @Override
-        public void setLevel(Level newLevel) throws SecurityException {
+        public void setLevel(final Level newLevel) throws SecurityException {
             handler.setLevel(newLevel);
         }
 
@@ -326,7 +326,7 @@ public class MultipointDiscoveryAgentTes
         }
 
         @Override
-        public boolean isLoggable(LogRecord record) {
+        public boolean isLoggable(final LogRecord record) {
             return handler.isLoggable(record);
         }
     }

Modified: tomee/tomee/trunk/server/openejb-server/src/main/java/org/apache/openejb/server/Start.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-server/src/main/java/org/apache/openejb/server/Start.java?rev=1607903&r1=1607902&r2=1607903&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-server/src/main/java/org/apache/openejb/server/Start.java
(original)
+++ tomee/tomee/trunk/server/openejb-server/src/main/java/org/apache/openejb/server/Start.java
Fri Jul  4 18:29:14 2014
@@ -29,7 +29,7 @@ import java.util.Set;
 
 public class Start {
 
-    public static void main(String[] args) {
+    public static void main(final String[] args) {
 
         //        System.exit(new Start().start()?0:1);
 
@@ -65,9 +65,9 @@ public class Start {
 
         try {
 
-            ArrayList<String> cmd = new ArrayList<String>();
+            final ArrayList<String> cmd = new ArrayList<String>();
 
-            String s = java.io.File.separator;
+            final String s = java.io.File.separator;
 
             //Not really required here for exec, but as a reminder that we run on all platforms
             final boolean isWindows = System.getProperty("os.name").toLowerCase().contains("win");
@@ -84,9 +84,9 @@ public class Start {
 
             cmd.add("org.apache.openejb.server.Main");
 
-            String[] command = cmd.toArray(new String[cmd.size()]);
+            final String[] command = cmd.toArray(new String[cmd.size()]);
 
-            Runtime runtime = Runtime.getRuntime();
+            final Runtime runtime = Runtime.getRuntime();
 
             Process server = runtime.exec(command);
 
@@ -98,7 +98,7 @@ public class Start {
 
             serverOut.start();
 
-            InputStream err = server.getErrorStream();
+            final InputStream err = server.getErrorStream();
 
             Thread serverErr = new Thread(new Pipe(err, System.err));
 
@@ -114,13 +114,13 @@ public class Start {
 
     }
 
-    private void addSystemProperties(ArrayList<String> cmd) {
+    private void addSystemProperties(final ArrayList<String> cmd) {
 
-        Set set = System.getProperties().entrySet();
+        final Set set = System.getProperties().entrySet();
 
         for (final Object aSet : set) {
 
-            Map.Entry entry = (Map.Entry) aSet;
+            final Map.Entry entry = (Map.Entry) aSet;
 
             String key = (String) entry.getKey();
 
@@ -145,7 +145,7 @@ public class Start {
 
         String classpath = System.getProperty("java.class.path");
 
-        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        final ClassLoader cl = Thread.currentThread().getContextClassLoader();
 
         String antLoader = "org.apache.tools.ant.AntClassLoader";
 
@@ -153,7 +153,7 @@ public class Start {
 
             try {
 
-                Class ant = cl.getClass();
+                final Class ant = cl.getClass();
 
                 Method getClasspath = ant.getMethod("getClasspath", new Class[0]);
 
@@ -176,7 +176,7 @@ public class Start {
         private final InputStream is;
         private final OutputStream out;
 
-        private Pipe(InputStream is, OutputStream out) {
+        private Pipe(final InputStream is, final OutputStream out) {
 
             super();
 
@@ -203,7 +203,7 @@ public class Start {
 
                 }
 
-            } catch (Exception e) {
+            } catch (final Exception e) {
 
                 e.printStackTrace();
 

Modified: tomee/tomee/trunk/server/openejb-server/src/main/java/org/apache/openejb/server/auth/IPAddressPermissionEditor.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-server/src/main/java/org/apache/openejb/server/auth/IPAddressPermissionEditor.java?rev=1607903&r1=1607902&r2=1607903&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-server/src/main/java/org/apache/openejb/server/auth/IPAddressPermissionEditor.java
(original)
+++ tomee/tomee/trunk/server/openejb-server/src/main/java/org/apache/openejb/server/auth/IPAddressPermissionEditor.java
Fri Jul  4 18:29:14 2014
@@ -25,7 +25,7 @@ import java.beans.PropertyEditorSupport;
 public class IPAddressPermissionEditor extends PropertyEditorSupport {
     private IPAddressPermission addressMask;
 
-    public void setAsText(String text) throws IllegalArgumentException {
+    public void setAsText(final String text) throws IllegalArgumentException {
         addressMask = IPAddressPermissionFactory.getIPAddressMask(text);
     }
 

Modified: tomee/tomee/trunk/server/openejb-server/src/test/java/org/apache/openejb/server/FilteredServiceManagerDefaultsTest.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/server/openejb-server/src/test/java/org/apache/openejb/server/FilteredServiceManagerDefaultsTest.java?rev=1607903&r1=1607902&r2=1607903&view=diff
==============================================================================
--- tomee/tomee/trunk/server/openejb-server/src/test/java/org/apache/openejb/server/FilteredServiceManagerDefaultsTest.java
(original)
+++ tomee/tomee/trunk/server/openejb-server/src/test/java/org/apache/openejb/server/FilteredServiceManagerDefaultsTest.java
Fri Jul  4 18:29:14 2014
@@ -45,7 +45,7 @@ public class FilteredServiceManagerDefau
         // the return value should be a FilteredServiceManager
         assertEquals(FilteredServiceManager.class, ServiceManager.get().getClass());
 
-        FilteredServiceManager manager = (FilteredServiceManager) ServiceManager.get();
+        final FilteredServiceManager manager = (FilteredServiceManager) ServiceManager.get();
         assertEquals(1, manager.getDaemons().length);
         assertEquals("admin", manager.getDaemons()[0].getName());
     }

Propchange: tomee/tomee/trunk/tck/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Jul  4 18:29:14 2014
@@ -7,3 +7,4 @@
 .settings
 out
 target
+.idea

Added: tomee/tomee/trunk/unit-testing/README.txt
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/unit-testing/README.txt?rev=1607903&view=auto
==============================================================================
--- tomee/tomee/trunk/unit-testing/README.txt (added)
+++ tomee/tomee/trunk/unit-testing/README.txt Fri Jul  4 18:29:14 2014
@@ -0,0 +1,4 @@
+Each directory contains a POM for use in tests.
+
+The idea is to provide a parent POM for common testing scenarios that include
+all the relevant dependencies. This way only the parent POM needs to be declared.
\ No newline at end of file

Added: tomee/tomee/trunk/unit-testing/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/unit-testing/jaxrs/pom.xml?rev=1607903&view=auto
==============================================================================
--- tomee/tomee/trunk/unit-testing/jaxrs/pom.xml (added)
+++ tomee/tomee/trunk/unit-testing/jaxrs/pom.xml Fri Jul  4 18:29:14 2014
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Change: groupId, artifactId, version -->
+  <groupId>org.superbiz</groupId>
+  <artifactId>tomee-rest-arquillian</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <packaging>war</packaging>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>6.0-5</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>arquillian-tomee-embedded</artifactId>
+      <version>1.6.0.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-cxf-rs</artifactId>
+      <version>4.6.0.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>tomee-jaxrs</artifactId>
+      <version>1.6.0.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.1</version>
+        <configuration>
+          <optimize>true</optimize>
+          <source>1.7</source>
+          <target>1.7</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.17</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.3</version>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.openejb.maven</groupId>
+        <artifactId>tomee-maven-plugin</artifactId>
+        <version>1.6.0.2</version>
+        <configuration>
+          <tomeeVersion>1.6.0.2</tomeeVersion>
+          <tomeeClassifier>jaxrs</tomeeClassifier>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <repositories>
+    <repository>
+      <id>apache-snapshot</id>
+      <name>Apache Snapshot Repository</name>
+      <url>https://repository.apache.org/content/groups/snapshots/</url>
+    </repository>
+  </repositories>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+</project>

Added: tomee/tomee/trunk/unit-testing/pom.xml
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/unit-testing/pom.xml?rev=1607903&view=auto
==============================================================================
--- tomee/tomee/trunk/unit-testing/pom.xml (added)
+++ tomee/tomee/trunk/unit-testing/pom.xml Fri Jul  4 18:29:14 2014
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.openejb</groupId>
+  <artifactId>unit-testing</artifactId>
+  <version>2.0.0-SNAPSHOT</version>
+
+  <packaging>pom</packaging>
+
+  <properties>
+
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+    <version.tomee>2.0.0-SNAPSHOT</version.tomee>
+    <version.openejb>4.6.0.2</version.openejb>
+    <version.javaee-api>6.0-6</version.javaee-api>
+    <version.junit>4.11</version.junit>
+  </properties>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.apache.openejb</groupId>
+        <artifactId>javaee-api</artifactId>
+        <version>${version.javaee-api}</version>
+        <scope>provided</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.openejb</groupId>
+        <artifactId>arquillian-tomee-embedded</artifactId>
+        <version>${version.tomee}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.openejb</groupId>
+        <artifactId>openejb-cxf-rs</artifactId>
+        <version>${version.openejb}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.openejb</groupId>
+        <artifactId>tomee-jaxrs</artifactId>
+        <version>${version.tomee}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>${version.junit}</version>
+        <scope>test</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.1</version>
+        <configuration>
+          <optimize>true</optimize>
+          <source>1.7</source>
+          <target>1.7</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.17</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-war-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <failOnMissingWebXml>false</failOnMissingWebXml>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.openejb.maven</groupId>
+        <artifactId>tomee-maven-plugin</artifactId>
+        <version>${version.tomee}</version>
+        <configuration>
+          <tomeeVersion>${version.tomee}</tomeeVersion>
+          <tomeeClassifier>jaxrs</tomeeClassifier>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <repositories>
+    <repository>
+      <id>apache-snapshot</id>
+      <name>Apache Snapshot Repository</name>
+      <url>https://repository.apache.org/content/groups/snapshots/</url>
+    </repository>
+  </repositories>
+
+</project>

Propchange: tomee/tomee/trunk/utils/openejb-core-eclipselink/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Jul  4 18:29:14 2014
@@ -1 +1,2 @@
 target
+*.iml



Mime
View raw message