tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject [17/24] tomee git commit: Finals and formatting
Date Thu, 06 Dec 2018 17:33:39 GMT
Finals and formatting


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/ff6639ec
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/ff6639ec
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/ff6639ec

Branch: refs/heads/master
Commit: ff6639ec0d5c38c706e655398b0a1b3c1a91edc4
Parents: cf9d96e
Author: Jonathan Gallimore <jgallimore@tomitribe.com>
Authored: Wed Dec 5 12:35:58 2018 +0000
Committer: Jonathan Gallimore <jgallimore@tomitribe.com>
Committed: Wed Dec 5 12:35:58 2018 +0000

----------------------------------------------------------------------
 .../arquillian/tests/cmp/sample/ActorBean.java  |  6 ++---
 .../tests/cmp/sample/ActorDetails.java          |  2 +-
 .../tests/cmp/sample/CustomOrmXmlTest.java      |  2 +-
 .../arquillian/tests/cmp/sample/MovieBean.java  | 28 ++++++++++----------
 .../tests/cmp/sample/MovieDetails.java          |  2 +-
 .../tests/cmp/sample/MoviesBusinessBean.java    | 22 +++++++--------
 .../tests/cmp/sample/MoviesServlet.java         | 14 +++++-----
 7 files changed, 37 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
index de13f96..5542673 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorBean.java
@@ -37,15 +37,15 @@ public abstract class ActorBean implements EntityBean {
 
     public abstract void setMovies(Collection movies);
 
-    public String ejbCreate(String name) throws CreateException {
+    public String ejbCreate(final String name) throws CreateException {
         setName(name);
         return null;
     }
 
-    public void ejbPostCreate(String name) throws CreateException {
+    public void ejbPostCreate(final String name) throws CreateException {
     }
 
-    public void setEntityContext(EntityContext ctx) {
+    public void setEntityContext(final EntityContext ctx) {
         context = ctx;
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
index d95debf..23c1ce5 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/ActorDetails.java
@@ -20,7 +20,7 @@ public class ActorDetails implements java.io.Serializable {
     private Integer id;
     private String name;
 
-    public ActorDetails(Integer id, String name) {
+    public ActorDetails(final Integer id, final String name) {
         this.id = id;
         this.name = name;
     }

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
index e23521a..ce87196 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/CustomOrmXmlTest.java
@@ -40,7 +40,7 @@ public class CustomOrmXmlTest {
 
     @Deployment(testable = false)
     public static WebArchive createDeployment() {
-        WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName()
+ ".war")
+        final WebArchive archive = ShrinkWrap.create(WebArchive.class, CustomOrmXmlTest.class.getSimpleName()
+ ".war")
                 .addClasses(ActorBean.class, ActorDetails.class, LocalActor.class, LocalActorHome.class,
                         LocalMovie.class, LocalMovieHome.class, MovieBean.class, MovieDetails.class,
                         MoviesBusiness.class, MoviesBusinessBean.class, MoviesBusinessHome.class,

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
index 88f69da..f200bdb 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieBean.java
@@ -45,14 +45,14 @@ public abstract class MovieBean implements EntityBean {
     public abstract void setActors(Collection actors);
 
     public ArrayList getCopyOfActors() {
-        ArrayList actorList = new ArrayList();
-        Collection actors = getActors();
+        final ArrayList actorList = new ArrayList();
+        final Collection actors = getActors();
 
-        Iterator i = actors.iterator();
+        final Iterator i = actors.iterator();
 
         while (i.hasNext()) {
-            LocalActor actor = (LocalActor) i.next();
-            ActorDetails details =
+            final LocalActor actor = (LocalActor) i.next();
+            final ActorDetails details =
                 new ActorDetails(actor.getActorId(), actor.getName());
 
             actorList.add(details);
@@ -61,27 +61,27 @@ public abstract class MovieBean implements EntityBean {
         return actorList;
     }
 
-    public void addActor(LocalActor player) {
+    public void addActor(final LocalActor player) {
         try {
-            Collection actors = getActors();
+            final Collection actors = getActors();
 
             actors.add(player);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new EJBException(ex.getMessage());
         }
     }
 
-    public void removeActor(LocalActor actor) {
+    public void removeActor(final LocalActor actor) {
         try {
-            Collection players = getActors();
+            final Collection players = getActors();
 
             players.remove(actor);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new EJBException(ex.getMessage());
         }
     }
 
-    public String ejbCreate(String name, String genre)
+    public String ejbCreate(final String name, final String genre)
         throws CreateException {
         setName(name);
         setGenre(genre);
@@ -89,11 +89,11 @@ public abstract class MovieBean implements EntityBean {
         return null;
     }
 
-    public void ejbPostCreate(String name, String genre)
+    public void ejbPostCreate(final String name, final String genre)
         throws CreateException {
     }
 
-    public void setEntityContext(EntityContext ctx) {
+    public void setEntityContext(final EntityContext ctx) {
         context = ctx;
     }
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
index f08c257..84fe131 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MovieDetails.java
@@ -21,7 +21,7 @@ public class MovieDetails implements java.io.Serializable {
     private String name;
     private String genre;
 
-    public MovieDetails(String id, String name, String genre) {
+    public MovieDetails(final String id, final String name, final String genre) {
         this.id = id;
         this.name = name;
         this.genre = genre;

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
index 43c8667..9227dbf 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesBusinessBean.java
@@ -29,12 +29,12 @@ import javax.naming.InitialContext;
 public class MoviesBusinessBean implements SessionBean {
     public void doLogic() {
         try {
-            Context initial = new InitialContext();
+            final Context initial = new InitialContext();
 
-            LocalActorHome actorHome = (LocalActorHome) initial.lookup("java:comp/env/ejb/Actor");
-            Context initial1 = new InitialContext();
+            final LocalActorHome actorHome = (LocalActorHome) initial.lookup("java:comp/env/ejb/Actor");
+            final Context initial1 = new InitialContext();
 
-            LocalMovieHome movieHome = (LocalMovieHome) initial1.lookup("java:comp/env/ejb/Movie");
+            final LocalMovieHome movieHome = (LocalMovieHome) initial1.lookup("java:comp/env/ejb/Movie");
 
             final LocalMovie movie = movieHome.create("Bad Boys", "Action Comedy");
 
@@ -43,7 +43,7 @@ public class MoviesBusinessBean implements SessionBean {
 
             movie.addActor(actor1);
             movie.addActor(actor2);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new EJBException(ex.getMessage());
         }
     }
@@ -60,16 +60,16 @@ public class MoviesBusinessBean implements SessionBean {
     public void ejbRemove() {
     }
 
-    public void setSessionContext(SessionContext sc) {
+    public void setSessionContext(final SessionContext sc) {
     }
 
-    private ArrayList copyActorsToDetails(Collection actors) {
-        ArrayList detailsList = new ArrayList();
-        Iterator i = actors.iterator();
+    private ArrayList copyActorsToDetails(final Collection actors) {
+        final ArrayList detailsList = new ArrayList();
+        final Iterator i = actors.iterator();
 
         while (i.hasNext()) {
-            LocalActor player = (LocalActor) i.next();
-            ActorDetails details =
+            final LocalActor player = (LocalActor) i.next();
+            final ActorDetails details =
                 new ActorDetails(player.getActorId(), player.getName());
 
             detailsList.add(details);

http://git-wip-us.apache.org/repos/asf/tomee/blob/ff6639ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
----------------------------------------------------------------------
diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
index 983294c..54f0893 100644
--- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
+++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/cmp/sample/MoviesServlet.java
@@ -30,19 +30,17 @@ import javax.servlet.http.HttpServletResponse;
 public class MoviesServlet extends HttpServlet {
 
     @Override
-    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
IOException {
+    protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws
ServletException, IOException {
         try {
-            Context initial = new InitialContext();
-            Object objref = initial.lookup("java:comp/env/ejb/MoviesBusiness");
+            final Context initial = new InitialContext();
 
-            MoviesBusinessHome home =
-                    (MoviesBusinessHome) PortableRemoteObject.narrow(objref,
-                            MoviesBusinessHome.class);
+            final MoviesBusinessHome home = (MoviesBusinessHome)
+                    PortableRemoteObject.narrow(initial.lookup("java:comp/env/ejb/MoviesBusiness"),
MoviesBusinessHome.class);
 
-            MoviesBusiness moviesBusiness = home.create();
+            final MoviesBusiness moviesBusiness = home.create();
             moviesBusiness.doLogic();
 
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new ServletException(ex);
         }
     }


Mime
View raw message