You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2007/07/24 02:08:47 UTC

svn commit: r558899 - /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckMethods.java

Author: dblevins
Date: Mon Jul 23 17:08:46 2007
New Revision: 558899

URL: http://svn.apache.org/viewvc?view=rev&rev=558899
Log:
Accidentally turned "unused.ejb.create" into an failure when it used to be just a warning.  Put it back to being a warning.  In the processes, I noted that the checking code is not correct as it should also look in the local home interface too and not just the remote home interface.  This may result in false warnings.

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckMethods.java

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckMethods.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckMethods.java?view=diff&rev=558899&r1=558898&r2=558899
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckMethods.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/rules/CheckMethods.java Mon Jul 23 17:08:46 2007
@@ -253,13 +253,14 @@
             StringBuilder create = new StringBuilder(ejbCreate.getName());
             create.replace(0,4, "c");
             try {
+                // TODO, don't just check the remote home interface, there is a local too
                 home.getMethod(create.toString(), ejbCreate.getParameterTypes());
             } catch (NoSuchMethodException e) {
                 result = false;
 
                 String paramString = getParameters(ejbCreate);
 
-                fail(b, "unused.ejb.create", b.getEjbClass(), ejbCreate.getName(), create.toString(), paramString, home.getName());
+                warn(b, "unused.ejb.create", b.getEjbClass(), ejbCreate.getName(), create.toString(), paramString, home.getName());
 
             }
         }