You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2014/02/22 02:58:23 UTC

svn commit: r1570779 [5/7] - in /tomee/tomee/trunk/container/openejb-core/src/main: config/ java/org/apache/openejb/ java/org/apache/openejb/assembler/classic/ java/org/apache/openejb/assembler/classic/cmd/ java/org/apache/openejb/bval/ java/org/apache...

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedContainer.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedContainer.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedContainer.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedContainer.java Sat Feb 22 01:58:19 2014
@@ -329,12 +329,14 @@ public class ManagedContainer implements
     public Object invoke(final Object deployID, InterfaceType type, final Class callInterface, final Method callMethod, final Object[] args, final Object primKey) throws OpenEJBException {
         final BeanContext beanContext = this.getBeanContext(deployID);
 
-        if (beanContext == null)
+        if (beanContext == null) {
             throw new OpenEJBException("Deployment does not exist in this container. Deployment(id='" + deployID + "'), Container(id='" + containerID + "')");
+        }
 
         // Use the backup way to determine call type if null was supplied.
-        if (type == null)
+        if (type == null) {
             type = beanContext.getInterfaceType(callInterface);
+        }
 
         final Data data = (Data) beanContext.getContainerData();
         MethodType methodType = data.getMethodIndex().get(callMethod);
@@ -440,8 +442,9 @@ public class ManagedContainer implements
     }
 
     protected Object removeEJBObject(final BeanContext beanContext, final Object primKey, final Class callInterface, final Method callMethod, Object[] args, final InterfaceType interfaceType) throws OpenEJBException {
-        if (primKey == null)
+        if (primKey == null) {
             throw new NullPointerException("primKey is null");
+        }
 
         final ThreadContext callContext = new ThreadContext(beanContext, primKey);
         final ThreadContext oldCallContext = ThreadContext.enter(callContext);
@@ -690,8 +693,9 @@ public class ManagedContainer implements
 
     private void releaseInstance(final Instance instance) {
         // Don't pool if the bean has been undeployed
-        if (instance.beanContext.isDestroyed())
+        if (instance.beanContext.isDestroyed()) {
             return;
+        }
 
         // verify the instance is not associated with a bean-managed transaction
         if (instance.getBeanTransaction() != null) {
@@ -798,20 +802,23 @@ public class ManagedContainer implements
     }
 
     private void registerEntityManagers(final Instance instance, final ThreadContext callContext) throws OpenEJBException {
-        if (entityManagerRegistry == null)
+        if (entityManagerRegistry == null) {
             return;
+        }
 
         final BeanContext beanContext = callContext.getBeanContext();
 
         // get the factories
         final Index<EntityManagerFactory, Map> factories = beanContext.getExtendedEntityManagerFactories();
-        if (factories == null)
+        if (factories == null) {
             return;
+        }
 
         // get the managers for the factories
         final Map<EntityManagerFactory, JtaEntityManagerRegistry.EntityManagerTracker> entityManagers = instance.getEntityManagers(factories);
-        if (entityManagers == null)
+        if (entityManagers == null) {
             return;
+        }
 
         // register them
         try {
@@ -822,10 +829,12 @@ public class ManagedContainer implements
     }
 
     private void unregisterEntityManagers(final Instance instance, final ThreadContext callContext) {
-        if (entityManagerRegistry == null)
+        if (entityManagerRegistry == null) {
             return;
-        if (instance == null)
+        }
+        if (instance == null) {
             return;
+        }
 
         final BeanContext beanContext = callContext.getBeanContext();
 
@@ -938,12 +947,14 @@ public class ManagedContainer implements
                 final Instance instance = synchronization.instance;
 
                 // don't call beforeCompletion when transaction is marked rollback only
-                if (txPolicy.isRollbackOnly())
+                if (txPolicy.isRollbackOnly()) {
                     return;
+                }
 
                 // only call beforeCompletion on beans with session synchronization
-                if (!synchronization.isCallSessionSynchronization())
+                if (!synchronization.isCallSessionSynchronization()) {
                     continue;
+                }
 
                 // Invoke beforeCompletion
                 final ThreadContext callContext = new ThreadContext(instance.beanContext, instance.primaryKey, Operation.BEFORE_COMPLETION);
@@ -1015,8 +1026,9 @@ public class ManagedContainer implements
                     discardInstance(callContext);
 
                     // [4] throw throw first exception to the client
-                    if (firstException == null)
+                    if (firstException == null) {
                         firstException = e;
+                    }
                 } finally {
                     ThreadContext.exit(oldCallContext);
                 }

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedObjectHandler.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedObjectHandler.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedObjectHandler.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/ManagedObjectHandler.java Sat Feb 22 01:58:19 2014
@@ -81,8 +81,12 @@ public class ManagedObjectHandler extend
         private final Object primaryKey;
 
         public RegistryId(final Container container, final Object deploymentId, final Object primaryKey) {
-            if (container == null) throw new NullPointerException("container is null");
-            if (deploymentId == null) throw new NullPointerException("deploymentId is null");
+            if (container == null) {
+                throw new NullPointerException("container is null");
+            }
+            if (deploymentId == null) {
+                throw new NullPointerException("deploymentId is null");
+            }
 
             this.containerId = container.getContainerID();
             this.deploymentId = deploymentId;
@@ -90,8 +94,12 @@ public class ManagedObjectHandler extend
         }
 
         public boolean equals(final Object o) {
-            if (this == o) return true;
-            if (o == null || getClass() != o.getClass()) return false;
+            if (this == o) {
+                return true;
+            }
+            if (o == null || getClass() != o.getClass()) {
+                return false;
+            }
 
             final RegistryId that = (RegistryId) o;
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/RAFPassivater.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/RAFPassivater.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/RAFPassivater.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/RAFPassivater.java Sat Feb 22 01:58:19 2014
@@ -62,9 +62,11 @@ public class RAFPassivater implements Pa
                 final byte [] bytes = Serializer.serialize(obj);
                 final long filepointer = ras.getFilePointer();
 
-                if (lastPointer == null) lastPointer = new Pointer(fileID, filepointer, (int) filepointer);
-                else
+                if (lastPointer == null) {
+                    lastPointer = new Pointer(fileID, filepointer, (int) filepointer);
+                } else {
                     lastPointer = new Pointer(fileID, filepointer, (int) (filepointer - lastPointer.filepointer));
+                }
 
                 masterTable.put(id, lastPointer);
                 ras.write(bytes);
@@ -79,8 +81,9 @@ public class RAFPassivater implements Pa
             throws SystemException {
 
         final Pointer pointer = (Pointer) masterTable.get(primaryKey);
-        if (pointer == null)
+        if (pointer == null) {
             return null;
+        }
 
         try {
             final RandomAccessFile ras = new RandomAccessFile(System.getProperty("java.io.tmpdir", File.separator + "tmp") + File.separator + "passivation" + pointer.fileid + ".ser", "r");

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/SimpleCache.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/SimpleCache.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/SimpleCache.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/managed/SimpleCache.java Sat Feb 22 01:58:19 2014
@@ -348,7 +348,9 @@ public class SimpleCache<K, V> implement
             final List<Entry> entries = new ArrayList<Entry>();
 
             int bulkPassivate = getBulkPassivate();
-            if (bulkPassivate < 1) bulkPassivate = 1;
+            if (bulkPassivate < 1) {
+                bulkPassivate = 1;
+            }
             for (int i = 0; i < bulkPassivate; i++) {
                 final Entry entry = lru.poll();
                 if (entry == null) {

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/EndpointHandler.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/EndpointHandler.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/EndpointHandler.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/EndpointHandler.java Sat Feb 22 01:58:19 2014
@@ -301,7 +301,9 @@ public class EndpointHandler implements 
     }
 
     public void release() {
-        if (state == State.RELEASED) return;
+        if (state == State.RELEASED) {
+            return;
+        }
         state = State.RELEASED;
 
         // notify the container
@@ -314,7 +316,9 @@ public class EndpointHandler implements 
     }
 
     private boolean isValidException(final Method method, final Throwable throwable) {
-        if (throwable instanceof RuntimeException || throwable instanceof Error) return true;
+        if (throwable instanceof RuntimeException || throwable instanceof Error) {
+            return true;
+        }
 
         final Class<?>[] exceptionTypes = method.getExceptionTypes();
         for (final Class<?> exceptionType : exceptionTypes) {

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbInstanceFactory.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbInstanceFactory.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbInstanceFactory.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbInstanceFactory.java Sat Feb 22 01:58:19 2014
@@ -144,7 +144,9 @@ public class MdbInstanceFactory {
      * @param ignoredInstanceCount
      */
     public void freeInstance(final Instance instance, final boolean ignoredInstanceCount) {
-        if (instance == null) throw new NullPointerException("bean is null");
+        if (instance == null) {
+            throw new NullPointerException("bean is null");
+        }
 
         // decrement the instance count
         if (!ignoredInstanceCount) {
@@ -189,7 +191,9 @@ public class MdbInstanceFactory {
      * @return the new replacement bean instance
      */
     public Object recreateInstance(final Object bean) throws UnavailableException {
-        if (bean == null) throw new NullPointerException("bean is null");
+        if (bean == null) {
+            throw new NullPointerException("bean is null");
+        }
         final Object newBean = constructBean();
         return newBean;
     }

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/JaccProvider.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/JaccProvider.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/JaccProvider.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/JaccProvider.java Sat Feb 22 01:58:19 2014
@@ -62,7 +62,9 @@ public abstract class JaccProvider {
      *                                the thrown PolicyContextException
      */
     public static void install() throws ClassNotFoundException, PolicyContextException {
-        if (jaccProvider != null) return;
+        if (jaccProvider != null) {
+            return;
+        }
 
         final String[] factoryClassName = {null};
         try {
@@ -70,8 +72,9 @@ public abstract class JaccProvider {
                 public Object run() throws Exception {
                     factoryClassName[0] = System.getProperty(FACTORY_NAME);
 
-                    if (factoryClassName[0] == null)
+                    if (factoryClassName[0] == null) {
                         throw new ClassNotFoundException("Property " + FACTORY_NAME + " not set");
+                    }
                     final Thread currentThread = Thread.currentThread();
                     final ClassLoader tccl = currentThread.getContextClassLoader();
                     return Class.forName(factoryClassName[0], true, tccl).newInstance();

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/GroupPrincipal.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/GroupPrincipal.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/GroupPrincipal.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/GroupPrincipal.java Sat Feb 22 01:58:19 2014
@@ -27,7 +27,9 @@ public class GroupPrincipal implements P
     private transient int hash;
 
     public GroupPrincipal(final String name) {
-        if (name == null) throw new IllegalArgumentException("name cannot be null");
+        if (name == null) {
+            throw new IllegalArgumentException("name cannot be null");
+        }
         this.name = name;
     }
 
@@ -36,12 +38,18 @@ public class GroupPrincipal implements P
     }
 
     public boolean equals(final Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
 
         final GroupPrincipal that = (GroupPrincipal) o;
 
-        if (!name.equals(that.name)) return false;
+        if (!name.equals(that.name)) {
+            return false;
+        }
 
         return true;
     }

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/PropertiesLoginModule.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/PropertiesLoginModule.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/PropertiesLoginModule.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/PropertiesLoginModule.java Sat Feb 22 01:58:19 2014
@@ -105,12 +105,18 @@ public class PropertiesLoginModule imple
 
         user = ((NameCallback) callbacks[0]).getName();
         char[] tmpPassword = ((PasswordCallback) callbacks[1]).getPassword();
-        if (tmpPassword == null) tmpPassword = new char[0];
+        if (tmpPassword == null) {
+            tmpPassword = new char[0];
+        }
 
         final String password = users.getProperty(user);
 
-        if (password == null) throw new FailedLoginException("User does not exist");
-        if (!password.equals(new String(tmpPassword))) throw new FailedLoginException("Password does not match");
+        if (password == null) {
+            throw new FailedLoginException("User does not exist");
+        }
+        if (!password.equals(new String(tmpPassword))) {
+            throw new FailedLoginException("Password does not match");
+        }
 
         users.clear();
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/SQLLoginModule.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/SQLLoginModule.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/SQLLoginModule.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/SQLLoginModule.java Sat Feb 22 01:58:19 2014
@@ -410,8 +410,9 @@ public class SQLLoginModule implements L
 
         public static Option findByName(final String name) {
             for (final Option opt : values()) {
-                if (opt.name.equals(name))
+                if (opt.name.equals(name)) {
                     return opt;
+                }
             }
             return null;
         }

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/UserPrincipal.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/UserPrincipal.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/UserPrincipal.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/UserPrincipal.java Sat Feb 22 01:58:19 2014
@@ -30,7 +30,9 @@ public class UserPrincipal implements Pr
     private transient int hash;
 
     public UserPrincipal(final String name) {
-        if (name == null) throw new IllegalArgumentException("name cannot be null");
+        if (name == null) {
+            throw new IllegalArgumentException("name cannot be null");
+        }
         this.name = name;
     }
 
@@ -39,12 +41,18 @@ public class UserPrincipal implements Pr
     }
 
     public boolean equals(final Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
 
         final UserPrincipal that = (UserPrincipal) o;
 
-        if (!name.equals(that.name)) return false;
+        if (!name.equals(that.name)) {
+            return false;
+        }
 
         return true;
     }

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicJaccProvider.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicJaccProvider.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicJaccProvider.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicJaccProvider.java Sat Feb 22 01:58:19 2014
@@ -77,7 +77,9 @@ public class BasicJaccProvider extends J
             try {
                 final BasicPolicyConfiguration configuration = configurations.get(contextID);
 
-                if (configuration == null || !configuration.inService()) return false;
+                if (configuration == null || !configuration.inService()) {
+                    return false;
+                }
 
                 return configuration.implies(domain, permission);
             } catch (final PolicyContextException e) {

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicPolicyConfiguration.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicPolicyConfiguration.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicPolicyConfiguration.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/security/jacc/BasicPolicyConfiguration.java Sat Feb 22 01:58:19 2014
@@ -55,12 +55,18 @@ public class BasicPolicyConfiguration im
 
     public boolean implies(final ProtectionDomain domain, final Permission permission) {
 
-        if (excluded != null && excluded.implies(permission)) return false;
+        if (excluded != null && excluded.implies(permission)) {
+            return false;
+        }
 
-        if (unchecked != null && unchecked.implies(permission)) return true;
+        if (unchecked != null && unchecked.implies(permission)) {
+            return true;
+        }
 
         final Principal[] principals = domain.getPrincipals();
-        if (principals.length == 0) return false;
+        if (principals.length == 0) {
+            return false;
+        }
 
         final RoleResolver roleResolver = SystemInstance.get().getComponent(RoleResolver.class);
         final Set<String> roles = roleResolver.getLogicalRoles(principals, rolePermissionsMap.keySet());
@@ -68,14 +74,18 @@ public class BasicPolicyConfiguration im
         for (final String role : roles) {
             final PermissionCollection permissions = rolePermissionsMap.get(role);
 
-            if (permissions != null && permissions.implies(permission)) return true;
+            if (permissions != null && permissions.implies(permission)) {
+                return true;
+            }
         }
 
         return false;
     }
 
     public void addToRole(final String roleName, final PermissionCollection permissions) throws PolicyContextException {
-        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) {
+            throw new UnsupportedOperationException("Not in an open state");
+        }
 
         final Enumeration e = permissions.elements();
         while (e.hasMoreElements()) {
@@ -84,7 +94,9 @@ public class BasicPolicyConfiguration im
     }
 
     public void addToRole(final String roleName, final Permission permission) throws PolicyContextException {
-        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) {
+            throw new UnsupportedOperationException("Not in an open state");
+        }
 
         PermissionCollection permissions = rolePermissionsMap.get(roleName);
         if (permissions == null) {
@@ -95,7 +107,9 @@ public class BasicPolicyConfiguration im
     }
 
     public void addToUncheckedPolicy(final PermissionCollection permissions) throws PolicyContextException {
-        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) {
+            throw new UnsupportedOperationException("Not in an open state");
+        }
 
         final Enumeration e = permissions.elements();
         while (e.hasMoreElements()) {
@@ -116,7 +130,9 @@ public class BasicPolicyConfiguration im
     }
 
     public void addToExcludedPolicy(final PermissionCollection permissions) throws PolicyContextException {
-        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) {
+            throw new UnsupportedOperationException("Not in an open state");
+        }
 
         final Enumeration e = permissions.elements();
         while (e.hasMoreElements()) {
@@ -137,25 +153,33 @@ public class BasicPolicyConfiguration im
     }
 
     public void removeRole(final String roleName) throws PolicyContextException {
-        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) {
+            throw new UnsupportedOperationException("Not in an open state");
+        }
 
         rolePermissionsMap.remove(roleName);
     }
 
     public void removeUncheckedPolicy() throws PolicyContextException {
-        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) {
+            throw new UnsupportedOperationException("Not in an open state");
+        }
 
         unchecked = null;
     }
 
     public void removeExcludedPolicy() throws PolicyContextException {
-        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) {
+            throw new UnsupportedOperationException("Not in an open state");
+        }
 
         excluded = null;
     }
 
     public void linkConfiguration(final PolicyConfiguration link) throws PolicyContextException {
-        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) {
+            throw new UnsupportedOperationException("Not in an open state");
+        }
     }
 
     public void delete() throws PolicyContextException {
@@ -163,7 +187,9 @@ public class BasicPolicyConfiguration im
     }
 
     public void commit() throws PolicyContextException {
-        if (state != OPEN) throw new UnsupportedOperationException("Not in an open state");
+        if (state != OPEN) {
+            throw new UnsupportedOperationException("Not in an open state");
+        }
         state = IN_SERVICE;
     }
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/singleton/SingletonEjbObjectHandler.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/singleton/SingletonEjbObjectHandler.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/singleton/SingletonEjbObjectHandler.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/singleton/SingletonEjbObjectHandler.java Sat Feb 22 01:58:19 2014
@@ -38,8 +38,9 @@ public class SingletonEjbObjectHandler e
     }
 
     public Object getRegistryId() {
-        if (registryId == null)
+        if (registryId == null) {
             registryId = createRegistryId(primaryKey, deploymentID, container);
+        }
         return registryId;
     }
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/singleton/SingletonInstanceManager.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/singleton/SingletonInstanceManager.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/singleton/SingletonInstanceManager.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/singleton/SingletonInstanceManager.java Sat Feb 22 01:58:19 2014
@@ -107,7 +107,9 @@ public class SingletonInstanceManager {
             // If there is a Future object in the AtomicReference, then
             // it's either been created or is being created now.
             Future<Instance> singletonFuture = singleton.get();
-            if (singletonFuture != null) return singletonFuture.get();
+            if (singletonFuture != null) {
+                return singletonFuture.get();
+            }
 
             // The singleton has not been created nor is being created
             // We will construct this FutureTask and compete with the
@@ -214,7 +216,9 @@ public class SingletonInstanceManager {
         final Future<Instance> instanceFuture = data.singleton.get();
 
         // Possible the instance was never created
-        if (instanceFuture == null) return;
+        if (instanceFuture == null) {
+            return;
+        }
 
         final Instance instance;
         try {
@@ -335,7 +339,9 @@ public class SingletonInstanceManager {
 
     public void undeploy(final BeanContext beanContext) {
         final Data data = (Data) beanContext.getContainerData();
-        if (data == null) return;
+        if (data == null) {
+            return;
+        }
 
         final MBeanServer server = LocalMBeanServer.get();
         for (final ObjectName objectName : data.jmxNames) {

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/RAFPassivater.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/RAFPassivater.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/RAFPassivater.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/RAFPassivater.java Sat Feb 22 01:58:19 2014
@@ -63,10 +63,11 @@ public class RAFPassivater implements Pa
                 final byte[] bytes = Serializer.serialize(obj);
                 final long filepointer = ras.getFilePointer();
 
-                if (lastPointer == null)
+                if (lastPointer == null) {
                     lastPointer = new Pointer(fileID, filepointer, (int) filepointer);
-                else
+                } else {
                     lastPointer = new Pointer(fileID, filepointer, (int) (filepointer - lastPointer.filepointer));
+                }
 
                 masterTable.put(id, lastPointer);
                 ras.write(bytes);
@@ -82,8 +83,9 @@ public class RAFPassivater implements Pa
             throws SystemException {
 
         final Pointer pointer = (Pointer) masterTable.get(primaryKey);
-        if (pointer == null)
+        if (pointer == null) {
             return null;
+        }
 
         try {
             final RandomAccessFile ras = new RandomAccessFile(System.getProperty("java.io.tmpdir", File.separator + "tmp") + File.separator + "passivation" + pointer.fileid + ".ser", "r");

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/SimpleCache.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/SimpleCache.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/SimpleCache.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/SimpleCache.java Sat Feb 22 01:58:19 2014
@@ -431,7 +431,9 @@ public class SimpleCache<K, V> implement
             final List<Entry> entries = new ArrayList<Entry>();
 
             int bulkPassivate = getBulkPassivate();
-            if (bulkPassivate < 1) bulkPassivate = 1;
+            if (bulkPassivate < 1) {
+                bulkPassivate = 1;
+            }
             for (int i = 0; i < bulkPassivate; i++) {
                 final Entry entry = lru.poll();
                 if (entry == null) {

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulContainer.java Sat Feb 22 01:58:19 2014
@@ -342,12 +342,14 @@ public class StatefulContainer implement
     public Object invoke(final Object deployID, InterfaceType type, final Class callInterface, final Method callMethod, final Object[] args, final Object primKey) throws OpenEJBException {
         final BeanContext beanContext = this.getBeanContext(deployID);
 
-        if (beanContext == null)
+        if (beanContext == null) {
             throw new OpenEJBException("Deployment does not exist in this container. Deployment(id='" + deployID + "'), Container(id='" + containerID + "')");
+        }
 
         // Use the backup way to determine call type if null was supplied.
-        if (type == null)
+        if (type == null) {
             type = beanContext.getInterfaceType(callInterface);
+        }
 
         final Data data = (Data) beanContext.getContainerData();
         MethodType methodType = data.getMethodIndex().get(callMethod);
@@ -462,8 +464,9 @@ public class StatefulContainer implement
     }
 
     protected Object removeEJBObject(final BeanContext beanContext, final Object primKey, final Class callInterface, final Method callMethod, Object[] args, final InterfaceType interfaceType) throws OpenEJBException {
-        if (primKey == null)
+        if (primKey == null) {
             throw new NullPointerException("primKey is null");
+        }
 
         final CdiEjbBean cdiEjbBean = beanContext.get(CdiEjbBean.class);
         if (cdiEjbBean != null) {
@@ -479,8 +482,9 @@ public class StatefulContainer implement
         final ThreadContext oldCallContext = ThreadContext.enter(callContext);
         try {
             // Security check
-            if (!internalRemove)
+            if (!internalRemove) {
                 checkAuthorization(callMethod, interfaceType);
+            }
 
             // If a bean managed transaction is active, the bean can not be removed
             if (interfaceType.isComponent()) {
@@ -897,20 +901,23 @@ public class StatefulContainer implement
     }
 
     private void registerEntityManagers(final Instance instance, final ThreadContext callContext) throws OpenEJBException {
-        if (entityManagerRegistry == null)
+        if (entityManagerRegistry == null) {
             return;
+        }
 
         final BeanContext beanContext = callContext.getBeanContext();
 
         // get the factories
         final Index<EntityManagerFactory, Map> factories = beanContext.getExtendedEntityManagerFactories();
-        if (factories == null)
+        if (factories == null) {
             return;
+        }
 
         // get the managers for the factories
         final Map<EntityManagerFactory, JtaEntityManagerRegistry.EntityManagerTracker> entityManagers = instance.getEntityManagers(factories);
-        if (entityManagers == null)
+        if (entityManagers == null) {
             return;
+        }
 
         // register them
         try {
@@ -921,10 +928,12 @@ public class StatefulContainer implement
     }
 
     private Map<EntityManagerFactory, JtaEntityManagerRegistry.EntityManagerTracker> unregisterEntityManagers(final Instance instance, final ThreadContext callContext) {
-        if (entityManagerRegistry == null)
+        if (entityManagerRegistry == null) {
             return null;
-        if (instance == null)
+        }
+        if (instance == null) {
             return null;
+        }
 
         final BeanContext beanContext = callContext.getBeanContext();
 
@@ -933,8 +942,9 @@ public class StatefulContainer implement
     }
 
     private void closeEntityManagers(final Map<EntityManagerFactory, JtaEntityManagerRegistry.EntityManagerTracker> unregisteredEntityManagers) {
-        if (unregisteredEntityManagers == null)
+        if (unregisteredEntityManagers == null) {
             return;
+        }
 
         // iterate throughout all EM to close EntityManager
         for (final JtaEntityManagerRegistry.EntityManagerTracker entityManagerTracker : unregisteredEntityManagers.values()) {
@@ -1049,12 +1059,14 @@ public class StatefulContainer implement
                 final Instance instance = synchronization.instance;
 
                 // don't call beforeCompletion when transaction is marked rollback only
-                if (txPolicy.isRollbackOnly())
+                if (txPolicy.isRollbackOnly()) {
                     return;
+                }
 
                 // only call beforeCompletion on beans with session synchronization
-                if (!synchronization.isCallSessionSynchronization())
+                if (!synchronization.isCallSessionSynchronization()) {
                     continue;
+                }
 
                 // Invoke beforeCompletion
                 final ThreadContext callContext = new ThreadContext(instance.beanContext, instance.primaryKey, Operation.BEFORE_COMPLETION);
@@ -1126,8 +1138,9 @@ public class StatefulContainer implement
                     discardInstance(callContext.getPrimaryKey(), instance);
 
                     // [4] throw throw first exception to the client
-                    if (firstException == null)
+                    if (firstException == null) {
                         firstException = e;
+                    }
                 } finally {
                     ThreadContext.exit(oldCallContext);
                 }

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulEjbObjectHandler.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulEjbObjectHandler.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulEjbObjectHandler.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateful/StatefulEjbObjectHandler.java Sat Feb 22 01:58:19 2014
@@ -81,8 +81,12 @@ public class StatefulEjbObjectHandler ex
         private final Object primaryKey;
 
         public RegistryId(final Container container, final Object deploymentId, final Object primaryKey) {
-            if (container == null) throw new NullPointerException("container is null");
-            if (deploymentId == null) throw new NullPointerException("deploymentId is null");
+            if (container == null) {
+                throw new NullPointerException("container is null");
+            }
+            if (deploymentId == null) {
+                throw new NullPointerException("deploymentId is null");
+            }
 
             this.containerId = container.getContainerID();
             this.deploymentId = deploymentId;
@@ -90,8 +94,12 @@ public class StatefulEjbObjectHandler ex
         }
 
         public boolean equals(final Object o) {
-            if (this == o) return true;
-            if (o == null || getClass() != o.getClass()) return false;
+            if (this == o) {
+                return true;
+            }
+            if (o == null || getClass() != o.getClass()) {
+                return false;
+            }
 
             final RegistryId that = (RegistryId) o;
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessContainerFactory.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessContainerFactory.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessContainerFactory.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessContainerFactory.java Sat Feb 22 01:58:19 2014
@@ -63,11 +63,15 @@ public class StatelessContainerFactory {
      * @param accessTimeout Duration
      */
     public void setAccessTimeout(final Duration accessTimeout) {
-        if (this.accessTimeout == null) setTimeOut(accessTimeout);
+        if (this.accessTimeout == null) {
+            setTimeOut(accessTimeout);
+        }
     }
 
     public void setMaxSize(final int max) {
-        if (this.max == null) setPoolSize(max);
+        if (this.max == null) {
+            setPoolSize(max);
+        }
     }
 
     /**

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessInstanceManager.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessInstanceManager.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessInstanceManager.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessInstanceManager.java Sat Feb 22 01:58:19 2014
@@ -419,19 +419,25 @@ public class StatelessInstanceManager {
     }
 
     private void setDefault(final Duration duration, final TimeUnit unit) {
-        if (duration.getUnit() == null) duration.setUnit(unit);
+        if (duration.getUnit() == null) {
+            duration.setUnit(unit);
+        }
     }
 
     private Duration getDuration(final Options options, final String property, final Duration defaultValue, final TimeUnit defaultUnit) {
         final String s = options.get(property, defaultValue.toString());
         final Duration duration = new Duration(s);
-        if (duration.getUnit() == null) duration.setUnit(defaultUnit);
+        if (duration.getUnit() == null) {
+            duration.setUnit(defaultUnit);
+        }
         return duration;
     }
 
     public void undeploy(final BeanContext beanContext) {
         final Data data = (Data) beanContext.getContainerData();
-        if (data == null) return;
+        if (data == null) {
+            return;
+        }
 
         final MBeanServer server = LocalMBeanServer.get();
         for (final ObjectName objectName : data.jmxNames) {

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/DefaultTimerThreadPoolAdapter.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/DefaultTimerThreadPoolAdapter.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/DefaultTimerThreadPoolAdapter.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/DefaultTimerThreadPoolAdapter.java Sat Feb 22 01:58:19 2014
@@ -91,7 +91,9 @@ public class DefaultTimerThreadPoolAdapt
         private final Executor executor;
 
         private TimerExecutor(final Executor executor) {
-            if (executor == null) throw new IllegalArgumentException("executor cannot be null");
+            if (executor == null) {
+                throw new IllegalArgumentException("executor cannot be null");
+            }
             this.executor = executor;
         }
     }

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EJBCronTrigger.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EJBCronTrigger.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EJBCronTrigger.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/EJBCronTrigger.java Sat Feb 22 01:58:19 2014
@@ -1052,8 +1052,9 @@ public class    EJBCronTrigger extends C
 
                 while (isValidResult(calendar, nextValue)) {
 
-                    if (nextValue >= currValue)
+                    if (nextValue >= currValue) {
                         return nextValue;
+                    }
 
                     nextValue = nextValue + interval;
 
@@ -1078,8 +1079,9 @@ public class    EJBCronTrigger extends C
 
                 while (isValidResult(calendar, previousValue)) {
 
-                    if (previousValue < currValue)
+                    if (previousValue < currValue) {
                         return previousValue;
+                    }
 
                     previousValue = previousValue - interval;
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/MemoryTimerStore.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/MemoryTimerStore.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/MemoryTimerStore.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/MemoryTimerStore.java Sat Feb 22 01:58:19 2014
@@ -217,7 +217,9 @@ public class MemoryTimerStore implements
         }
 
         private void checkThread() {
-            if (!lock.tryLock()) throw new IllegalStateException("Illegal access by Thread[" + Thread.currentThread().getName() + "]", concurentException);
+            if (!lock.tryLock()) {
+                throw new IllegalStateException("Illegal access by Thread[" + Thread.currentThread().getName() + "]", concurentException);
+            }
         }
 
         @Override
@@ -225,7 +227,9 @@ public class MemoryTimerStore implements
             checkThread();
             final TreeMap<Long, TimerData> allTasks = new TreeMap<Long, TimerData>();
             allTasks.putAll(taskStore);
-            for (final Long key : remove) allTasks.remove(key);
+            for (final Long key : remove) {
+                allTasks.remove(key);
+            }
             allTasks.putAll(add);
             return Collections.unmodifiableMap(allTasks);
         }
@@ -263,7 +267,9 @@ public class MemoryTimerStore implements
             checkThread();
 
             // if the tx was not committed, there is nothign to update
-            if (status != Status.STATUS_COMMITTED) return;
+            if (status != Status.STATUS_COMMITTED) {
+                return;
+            }
 
             // add the new work
             taskStore.putAll(add);

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerImpl.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerImpl.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerImpl.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/timer/TimerImpl.java Sat Feb 22 01:58:19 2014
@@ -45,7 +45,9 @@ public class TimerImpl implements Timer,
     public long getTimeRemaining() throws IllegalStateException, NoSuchObjectLocalException {
         checkState();
         final Date nextTimeout = timerData.getNextTimeout();
-        if (nextTimeout == null) throw new NoMoreTimeoutsException("The timer has no future timeouts");
+        if (nextTimeout == null) {
+            throw new NoMoreTimeoutsException("The timer has no future timeouts");
+        }
         return timerData.getTimeRemaining();
     }
 
@@ -53,7 +55,9 @@ public class TimerImpl implements Timer,
         checkState();
         
         final Date nextTimeout = timerData.getNextTimeout();
-        if (nextTimeout == null) throw new NoMoreTimeoutsException("The timer has no future timeouts");
+        if (nextTimeout == null) {
+            throw new NoMoreTimeoutsException("The timer has no future timeouts");
+        }
         return timerData.getNextTimeout();
     }
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicy.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicy.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicy.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicy.java Sat Feb 22 01:58:19 2014
@@ -214,7 +214,9 @@ public abstract class JtaTransactionPoli
 
     protected void setRollbackOnly(final Transaction tx, final Throwable reason) {
         try {
-            if (tx == null || tx.getStatus() != Status.STATUS_ACTIVE) return;
+            if (tx == null || tx.getStatus() != Status.STATUS_ACTIVE) {
+                return;
+            }
 
             if (reason == null) {
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicyFactory.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicyFactory.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicyFactory.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/JtaTransactionPolicyFactory.java Sat Feb 22 01:58:19 2014
@@ -25,7 +25,9 @@ public class JtaTransactionPolicyFactory
     private final TransactionManager transactionManager;
 
     public JtaTransactionPolicyFactory(final TransactionManager transactionManager) {
-        if (transactionManager == null) throw new NullPointerException("transactionManager is null");
+        if (transactionManager == null) {
+            throw new NullPointerException("transactionManager is null");
+        }
         this.transactionManager = transactionManager;
     }
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/SimpleWorkManager.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/SimpleWorkManager.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/SimpleWorkManager.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/SimpleWorkManager.java Sat Feb 22 01:58:19 2014
@@ -44,43 +44,59 @@ public class SimpleWorkManager implement
     private Executor executor;
 
     public SimpleWorkManager(final Executor executor) {
-        if (executor == null) throw new NullPointerException("executor is null");
+        if (executor == null) {
+            throw new NullPointerException("executor is null");
+        }
         this.executor = executor;
     }
 
     public void doWork(final Work work) throws WorkException {
-        if (work == null) throw new NullPointerException("work is null");
+        if (work == null) {
+            throw new NullPointerException("work is null");
+        }
         doWork(work, INDEFINITE, null, null);
     }
 
     public void doWork(final Work work, final long startTimeout, final ExecutionContext executionContext, final WorkListener workListener) throws WorkException {
-        if (work == null) throw new NullPointerException("work is null");
+        if (work == null) {
+            throw new NullPointerException("work is null");
+        }
         executeWork(WorkType.DO, work, startTimeout, executionContext, workListener);
     }
 
     public long startWork(final Work work) throws WorkException {
-        if (work == null) throw new NullPointerException("work is null");
+        if (work == null) {
+            throw new NullPointerException("work is null");
+        }
         return startWork(work, INDEFINITE, null, null);
     }
 
     public long startWork(final Work work, final long startTimeout, final ExecutionContext executionContext, final WorkListener workListener) throws WorkException {
-        if (work == null) throw new NullPointerException("work is null");
+        if (work == null) {
+            throw new NullPointerException("work is null");
+        }
         return executeWork(WorkType.START, work, startTimeout, executionContext, workListener);
     }
 
     public void scheduleWork(final Work work) throws WorkException {
-        if (work == null) throw new NullPointerException("work is null");
+        if (work == null) {
+            throw new NullPointerException("work is null");
+        }
         scheduleWork(work, INDEFINITE, null, null);
     }
 
     public void scheduleWork(final Work work, final long startTimeout, final ExecutionContext executionContext, final WorkListener workListener) throws WorkException {
-        if (work == null) throw new NullPointerException("work is null");
+        if (work == null) {
+            throw new NullPointerException("work is null");
+        }
         executeWork(WorkType.SCHEDULE, work, startTimeout, executionContext, workListener);
     }
 
     private long executeWork(final WorkType workType, final Work work, final long startTimeout, final ExecutionContext executionContext, WorkListener workListener) throws WorkException {
         // assure we have a work listener
-        if (workListener == null) workListener = new LoggingWorkListener(workType);
+        if (workListener == null) {
+            workListener = new LoggingWorkListener(workType);
+        }
 
         // reject work with an XID
         if (executionContext != null && executionContext.getXid() != null) {

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionType.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionType.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionType.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionType.java Sat Feb 22 01:58:19 2014
@@ -41,7 +41,9 @@ public enum TransactionType {
 
     public static TransactionType get(final String name) {
         for (final TransactionType type : values()) {
-            if (type.name().equalsIgnoreCase(name)) return type;
+            if (type.name().equalsIgnoreCase(name)) {
+                return type;
+            }
         }
 
         throw new IllegalArgumentException("Uknown TransactionType " + name);

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TxBeanManaged.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TxBeanManaged.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TxBeanManaged.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TxBeanManaged.java Sat Feb 22 01:58:19 2014
@@ -65,7 +65,9 @@ public class TxBeanManaged extends JtaTr
     }
 
     public void resumeUserTransaction(final SuspendedTransaction suspendedTransaction) throws SystemException {
-        if (suspendedTransaction == null) throw new NullPointerException("suspendedTransaction is null");
+        if (suspendedTransaction == null) {
+            throw new NullPointerException("suspendedTransaction is null");
+        }
         
         final Transaction beanTransaction = ((JtaSuspendedTransaction) suspendedTransaction).transaction;
         if (beanTransaction == null) {
@@ -112,7 +114,9 @@ public class TxBeanManaged extends JtaTr
         private Transaction transaction;
 
         public JtaSuspendedTransaction(final Transaction transaction) {
-            if (transaction == null) throw new NullPointerException("transaction is null");
+            if (transaction == null) {
+                throw new NullPointerException("transaction is null");
+            }
             this.transaction = transaction;
         }
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/HandlerData.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/HandlerData.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/HandlerData.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/HandlerData.java Sat Feb 22 01:58:19 2014
@@ -31,7 +31,9 @@ public class HandlerData {
     private final List<Method> preDestroy = new ArrayList<Method>();
 
     public HandlerData(final Class<?> handlerClass) {
-        if (handlerClass == null) throw new NullPointerException("handlerClass is null");
+        if (handlerClass == null) {
+            throw new NullPointerException("handlerClass is null");
+        }
         this.handlerClass = handlerClass;
     }
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/JaxWsUtils.java Sat Feb 22 01:58:19 2014
@@ -225,21 +225,27 @@ public final class JaxWsUtils {
         final WebService webService = clazz.getAnnotation(WebService.class);
         if (webService != null) {
             String wsdlLocation = webService.wsdlLocation().trim();
-            if (wsdlLocation.length() == 0) wsdlLocation = null;
+            if (wsdlLocation.length() == 0) {
+                wsdlLocation = null;
+            }
             return wsdlLocation;
         }
 
         final WebServiceClient webServiceClient = clazz.getAnnotation(WebServiceClient.class);
         if (webServiceClient != null) {
             String wsdlLocation = webServiceClient.wsdlLocation().trim();
-            if (wsdlLocation.length() == 0) wsdlLocation = null;
+            if (wsdlLocation.length() == 0) {
+                wsdlLocation = null;
+            }
             return wsdlLocation;
         }
 
         final WebServiceProvider webServiceProvider = clazz.getAnnotation(WebServiceProvider.class);
         if (webServiceProvider != null) {
             String wsdlLocation = webServiceProvider.wsdlLocation().trim();
-            if (wsdlLocation.length() == 0) wsdlLocation = null;
+            if (wsdlLocation.length() == 0) {
+                wsdlLocation = null;
+            }
             return wsdlLocation;
         }
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/PortAddressRegistryImpl.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/PortAddressRegistryImpl.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/PortAddressRegistryImpl.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/PortAddressRegistryImpl.java Sat Feb 22 01:58:19 2014
@@ -33,11 +33,21 @@ public class PortAddressRegistryImpl imp
     private Map<QName, Map<String, PortAddress>> portsByServiceQName = new HashMap<QName, Map<String, PortAddress>>();
 
     public synchronized void addPort(final String serviceId, final QName serviceQName, final String portId, final QName portQName, final String portInterface, final String address) throws OpenEJBException {
-        if (serviceId == null) throw new NullPointerException("serviceId is null");
-        if (serviceQName == null) throw new NullPointerException("serviceQName is null");
-        if (portId == null) throw new NullPointerException("portId is null");
-        if (portQName == null) throw new NullPointerException("portQName is null");
-        if (address == null) throw new NullPointerException("address is null");
+        if (serviceId == null) {
+            throw new NullPointerException("serviceId is null");
+        }
+        if (serviceQName == null) {
+            throw new NullPointerException("serviceQName is null");
+        }
+        if (portId == null) {
+            throw new NullPointerException("portId is null");
+        }
+        if (portQName == null) {
+            throw new NullPointerException("portQName is null");
+        }
+        if (address == null) {
+            throw new NullPointerException("address is null");
+        }
 
         // create portAddress
         PortAddress portAddress = portsById.get(portId);
@@ -76,9 +86,15 @@ public class PortAddressRegistryImpl imp
     }
 
     public synchronized void removePort(final String serviceId, final QName serviceQName, final String portId, final String portInterface) {
-        if (serviceId == null) throw new NullPointerException("serviceId is null");
-        if (serviceQName == null) throw new NullPointerException("serviceQName is null");
-        if (portId == null) throw new NullPointerException("portId is null");
+        if (serviceId == null) {
+            throw new NullPointerException("serviceId is null");
+        }
+        if (serviceQName == null) {
+            throw new NullPointerException("serviceQName is null");
+        }
+        if (portId == null) {
+            throw new NullPointerException("portId is null");
+        }
 
         // remove from portById
         final PortAddress portAddress = portsById.remove(portId);
@@ -120,7 +136,9 @@ public class PortAddressRegistryImpl imp
     }
 
     public synchronized Set<PortAddress> getPorts(final String id, final QName serviceQName, final String referenceClassName) {
-        if (serviceQName == null) throw new NullPointerException("serviceQName is null");
+        if (serviceQName == null) {
+            throw new NullPointerException("serviceQName is null");
+        }
 
         // check if there is a port with the id
         if (id != null) {
@@ -143,13 +161,17 @@ public class PortAddressRegistryImpl imp
         final Map<String, PortAddress> ports = new TreeMap<String, PortAddress>();
         if (id != null) {
             final Map<String, PortAddress> idPorts = portsByServiceId.get(id);
-            if (idPorts != null) ports.putAll(idPorts);
+            if (idPorts != null) {
+                ports.putAll(idPorts);
+            }
         }
 
         // find matching ports  by serviceQName
         if (ports.isEmpty()) {
             final Map<String, PortAddress> qnamePorts = portsByServiceQName.get(serviceQName);
-            if (qnamePorts != null) ports.putAll(qnamePorts);
+            if (qnamePorts != null) {
+                ports.putAll(qnamePorts);
+            }
         }
 
         final Set<PortAddress> portAddresses = new HashSet<PortAddress>(ports.values());

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/core/webservices/ProviderWrapper.java Sat Feb 22 01:58:19 2014
@@ -344,7 +344,9 @@ public class ProviderWrapper extends Pro
 
     private static Provider findProvider() {
         ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-        if (classLoader == null) classLoader = ClassLoader.getSystemClassLoader();
+        if (classLoader == null) {
+            classLoader = ClassLoader.getSystemClassLoader();
+        }
 
         // 0. System.getProperty("openejb.javax.xml.ws.spi.Provider")
         // This is so those using old axis rules still work as expected

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/dyni/DynamicSubclass.java Sat Feb 22 01:58:19 2014
@@ -101,7 +101,9 @@ public class DynamicSubclass implements 
         cw.visitField(ACC_FINAL + ACC_PRIVATE, "this$handler", "Ljava/lang/reflect/InvocationHandler;", null, null).visitEnd();
 
         for (final Constructor<?> constructor : classToProxy.getConstructors()) {
-            if (!Modifier.isPublic(constructor.getModifiers())) continue;
+            if (!Modifier.isPublic(constructor.getModifiers())) {
+                continue;
+            }
 
             final MethodVisitor mv = visitConstructor(cw, proxyClassFileName, classFileName, constructor);
             visitors.put("<init>" + Type.getConstructorDescriptor(constructor), mv);
@@ -206,8 +208,12 @@ public class DynamicSubclass implements 
     }
 
     public static int size(final Type type) {
-        if (Type.VOID_TYPE.equals(type)) return 0;
-        if (Type.LONG_TYPE.equals(type) || Type.DOUBLE_TYPE.equals(type)) return 2;
+        if (Type.VOID_TYPE.equals(type)) {
+            return 0;
+        }
+        if (Type.LONG_TYPE.equals(type) || Type.DOUBLE_TYPE.equals(type)) {
+            return 2;
+        }
         return 1;
     }
 
@@ -311,7 +317,9 @@ public class DynamicSubclass implements 
         public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) {
             final MethodVisitor newMethod = visitors.remove(name + desc);
 
-            if (newMethod == null) return null;
+            if (newMethod == null) {
+                return null;
+            }
 
             final MethodVisitor oldMethod = super.visitMethod(access, name, desc, signature, exceptions);
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/log/FileHandler.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/log/FileHandler.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/log/FileHandler.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/log/FileHandler.java Sat Feb 22 01:58:19 2014
@@ -236,8 +236,9 @@ public class FileHandler
 
         writerLock.writeLock().lock();
         try {
-            if (writer == null)
+            if (writer == null) {
                 return;
+            }
             writer.write(getFormatter().getTail(this));
             writer.flush();
             writer.close();
@@ -259,8 +260,9 @@ public class FileHandler
 
         writerLock.readLock().lock();
         try {
-            if (writer == null)
+            if (writer == null) {
                 return;
+            }
             writer.flush();
         } catch (final Exception e) {
             reportError(null, e, ErrorManager.FLUSH_FAILURE);
@@ -286,12 +288,15 @@ public class FileHandler
 
         // Retrieve configuration of logging file name
         rotatable = Boolean.parseBoolean(getProperty(className + ".rotatable", "true"));
-        if (directory == null)
+        if (directory == null) {
             directory = getProperty(className + ".directory", "logs");
-        if (prefix == null)
+        }
+        if (prefix == null) {
             prefix = getProperty(className + ".prefix", "juli.");
-        if (suffix == null)
+        }
+        if (suffix == null) {
             suffix = getProperty(className + ".suffix", ".log");
+        }
         final String sBufferSize = getProperty(className + ".bufferSize", String.valueOf(bufferSize));
         try {
             bufferSize = Integer.parseInt(sBufferSize);

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/math/util/MathUtils.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/math/util/MathUtils.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/math/util/MathUtils.java Sat Feb 22 01:58:19 2014
@@ -197,8 +197,9 @@ public final class MathUtils {
             return n;
         }
         // Use symmetry for large k
-        if (k > n / 2)
+        if (k > n / 2) {
             return binomialCoefficient(n, n - k);
+        }
 
         // We use the formula
         // (n choose k) = n! / (n-k)! / k!

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/math/util/ResizableDoubleArray.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/math/util/ResizableDoubleArray.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/math/util/ResizableDoubleArray.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/math/util/ResizableDoubleArray.java Sat Feb 22 01:58:19 2014
@@ -458,7 +458,9 @@ public class ResizableDoubleArray implem
         } else {
             // "Subtract" this number of discarded from numElements
             numElements -= i;
-            if (front) startIndex += i;
+            if (front) {
+                startIndex += i;
+            }
         }
         if (shouldContract()) {
             contract();

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/Event.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/Event.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/Event.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/Event.java Sat Feb 22 01:58:19 2014
@@ -46,7 +46,9 @@ public class Event {
     public String getLatest() {
         final long last = this.last.get();
 
-        if (last <= 0) return "-";
+        if (last <= 0) {
+            return "-";
+        }
         
         final DateFormat format = SimpleDateFormat.getDateTimeInstance();
         return format.format(new Date(last));

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/ManagedMBean.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/ManagedMBean.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/ManagedMBean.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/ManagedMBean.java Sat Feb 22 01:58:19 2014
@@ -158,7 +158,9 @@ public class ManagedMBean implements Dyn
         if (managed != null) {
             try {
                 String s = "";
-                if (managed.append()) s = member.getName();
+                if (managed.append()) {
+                    s = member.getName();
+                }
                 scan(member.get(), s);
             } catch (final IllegalAccessException e) {
                 e.printStackTrace();
@@ -174,7 +176,9 @@ public class ManagedMBean implements Dyn
         try {
             final Member member = attributesMap.get(s);
 
-            if (member == null) throw new AttributeNotFoundException(s);
+            if (member == null) {
+                throw new AttributeNotFoundException(s);
+            }
 
             return member.get();
         } catch (final Exception e) {
@@ -264,8 +268,12 @@ public class ManagedMBean implements Dyn
             final Iterator<MBeanAttributeInfo> iterator = attributes.iterator();
             while (iterator.hasNext()) {
                 final MBeanAttributeInfo info = iterator.next();
-                if (includes.matcher(info.getName()).matches()) continue;
-                if (excludes.matcher(info.getName()).matches()) iterator.remove();
+                if (includes.matcher(info.getName()).matches()) {
+                    continue;
+                }
+                if (excludes.matcher(info.getName()).matches()) {
+                    iterator.remove();
+                }
             }
         }
 
@@ -273,8 +281,12 @@ public class ManagedMBean implements Dyn
     }
 
     public void setAttributesFilter(String exclude, String include) {
-        if (include == null) include = "";
-        if (exclude == null) exclude = "";
+        if (include == null) {
+            include = "";
+        }
+        if (exclude == null) {
+            exclude = "";
+        }
         includes = Pattern.compile(include);
         excludes = Pattern.compile(exclude);
 
@@ -345,11 +357,17 @@ public class ManagedMBean implements Dyn
             final StringBuilder name = new StringBuilder(method);
             
             // remove 'get'
-            if (method.matches("get([A-Z].*|)")) name.delete(0, 3);
-            if (method.matches("is([A-Z].*|)")) name.delete(0, 2);
+            if (method.matches("get([A-Z].*|)")) {
+                name.delete(0, 3);
+            }
+            if (method.matches("is([A-Z].*|)")) {
+                name.delete(0, 2);
+            }
 
             if (!"".equals(prefix)) {
-                if (!"".equals(name.toString())) name.insert(0, ".");
+                if (!"".equals(name.toString())) {
+                    name.insert(0, ".");
+                }
                 name.insert(0, prefix);
             }
 
@@ -403,7 +421,9 @@ public class ManagedMBean implements Dyn
             name.setCharAt(0, Character.toUpperCase(name.charAt(0)));
 
             if (!"".equals(prefix)) {
-                if (!"".equals(name.toString())) name.insert(0, ".");
+                if (!"".equals(name.toString())) {
+                    name.insert(0, ".");
+                }
                 name.insert(0, prefix);
             }
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/StatsInterceptor.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/StatsInterceptor.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/StatsInterceptor.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/monitoring/StatsInterceptor.java Sat Feb 22 01:58:19 2014
@@ -181,7 +181,9 @@ public class StatsInterceptor {
         } finally {
             long time = System.nanoTime() - start;
             time = millis(time); // do it in 2 steps since otherwise the measure is false (more false)
-            if (stats != null) stats.record(time);
+            if (stats != null) {
+                stats.record(time);
+            }
             invocationTime.addAndGet(time);
         }
     }
@@ -228,7 +230,9 @@ public class StatsInterceptor {
                 sb.append(clazz.getSimpleName());
                 sb.append(s);
             }
-            if (params.length > 0) sb.delete(sb.length() - s.length(), sb.length());
+            if (params.length > 0) {
+                sb.delete(sb.length() - s.length(), sb.length());
+            }
             sb.append(")");
 
             this.method = sb.toString();

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/JtaEntityManager.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/JtaEntityManager.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/JtaEntityManager.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/JtaEntityManager.java Sat Feb 22 01:58:19 2014
@@ -77,8 +77,12 @@ public class JtaEntityManager implements
     }
     
     public JtaEntityManager(final String unitName, final JtaEntityManagerRegistry registry, final EntityManagerFactory entityManagerFactory, final Map properties, final boolean extended) {
-        if (registry == null) throw new NullPointerException("registry is null");
-        if (entityManagerFactory == null) throw new NullPointerException("entityManagerFactory is null");
+        if (registry == null) {
+            throw new NullPointerException("registry is null");
+        }
+        if (entityManagerFactory == null) {
+            throw new NullPointerException("entityManagerFactory is null");
+        }
         this.unitName = unitName;
         this.registry = registry;
         this.entityManagerFactory = entityManagerFactory;
@@ -607,7 +611,9 @@ public class JtaEntityManager implements
         }
 
         public void stop() {
-            if (!em.logger.isDebugEnabled()) return;
+            if (!em.logger.isDebugEnabled()) {
+                return;
+            }
 
             final long time = TimeUnit.MILLISECONDS.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS);
 

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/JtaEntityManagerRegistry.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/JtaEntityManagerRegistry.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/JtaEntityManagerRegistry.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/JtaEntityManagerRegistry.java Sat Feb 22 01:58:19 2014
@@ -80,7 +80,9 @@ public class JtaEntityManagerRegistry {
      */
     @Geronimo
     public EntityManager getEntityManager(final EntityManagerFactory entityManagerFactory, final Map properties, final boolean extended, final String unitName) throws IllegalStateException {
-        if (entityManagerFactory == null) throw new NullPointerException("entityManagerFactory is null");
+        if (entityManagerFactory == null) {
+            throw new NullPointerException("entityManagerFactory is null");
+        }
         final EntityManagerTxKey txKey = new EntityManagerTxKey(entityManagerFactory);
         final boolean transactionActive = isTransactionActive();
 
@@ -305,7 +307,9 @@ public class JtaEntityManagerRegistry {
         private EntityManager entityManager;
 
         public EntityManagerTracker(final EntityManager entityManager) {
-            if (entityManager == null) throw new NullPointerException("entityManager is null.");
+            if (entityManager == null) {
+                throw new NullPointerException("entityManager is null.");
+            }
 
             this.counter = 0;
             this.entityManager = entityManager;

Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/PersistenceBootstrap.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/PersistenceBootstrap.java?rev=1570779&r1=1570778&r2=1570779&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/PersistenceBootstrap.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/persistence/PersistenceBootstrap.java Sat Feb 22 01:58:19 2014
@@ -245,7 +245,9 @@ public class PersistenceBootstrap {
     }
 
     private static void debug(final String x) {
-        if (debug) System.out.println("[PersistenceBootstrap] " + x);
+        if (debug) {
+            System.out.println("[PersistenceBootstrap] " + x);
+        }
     }
 
     private static void debug(final String x, final Throwable t) {
@@ -295,7 +297,9 @@ public class PersistenceBootstrap {
             public void startElement(final String uri, final String localName, final String qName, final Attributes attributes) {
                 characters = new StringBuilder(100);
 
-                if (localName.equals("persistence-unit")) startPersistenceUnit(uri, localName, qName, attributes);
+                if (localName.equals("persistence-unit")) {
+                    startPersistenceUnit(uri, localName, qName, attributes);
+                }
             }
 
             public void startPersistenceUnit(final String uri, final String localName, final String qName, final Attributes attributes) {
@@ -309,9 +313,13 @@ public class PersistenceBootstrap {
             }
 
             public void endElement(final String uri, final String localName, final String qName) {
-                if (localName.equals("persistence-unit")) endPersistenceUnit(uri, localName, qName);
-                else if (localName.equals("provider")) endProvider(uri, localName, qName);
-                else if (localName.equals("class")) endClass(uri, localName, qName);
+                if (localName.equals("persistence-unit")) {
+                    endPersistenceUnit(uri, localName, qName);
+                } else if (localName.equals("provider")) {
+                    endProvider(uri, localName, qName);
+                } else if (localName.equals("class")) {
+                    endClass(uri, localName, qName);
+                }
             }
 
             public void endPersistenceUnit(final String uri, final String localName, final String qName) {
@@ -354,7 +362,9 @@ public class PersistenceBootstrap {
                 /*
                  * REMIND: we don't handle nested JAR URLs
                  */
-                if (separator == -1) throw new MalformedURLException("no ! found in jar url spec:" + spec);
+                if (separator == -1) {
+                    throw new MalformedURLException("no ! found in jar url spec:" + spec);
+                }
 
                 return toFile(new URL(spec.substring(0, separator++)));
             } catch (final MalformedURLException e) {