Patches item #444422, was opened at 2001-07-25 02:56
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=444422&group_id=22866

Category: JBossServer
Group: v2.5 Rabbit Hole (unstable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Makas Lau (ducknight79)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bugs in JDBCQueryMetaDataFactory.java

Initial Comment:
Please check the difference between the first file(
patched ) and the second( non-patched ).

The assignment of methodIntf should be
queryData.getMethodIntf() not
queryData.getMethodName().

The homeClass and localClass must be checked for null
as they are optional before assigning the method to
them.


--- JDBCQueryMetaDataFactory.java       Wed Jul 25
17:33:38 2001
+++
/home/makas/dev/mine/cvs/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCQueryMetaDataFactory.java
      
Sun Jun 24 11:23:15 2001
@@ -88,7 +88,7 @@
    public Method[] getQueryMethods(QueryMetaData
queryData) throws DeploymentException {
                String methodName =
queryData.getMethodName();
                Class[] parameters =
convertToJavaClasses(queryData.getMethodParams());
-               String methodIntf =
queryData.getMethodIntf(); // changed from
queryData.getMethodName() to queryData.getMethodIntf()
+               String methodIntf =
queryData.getMethodName();
                return getQueryMethods(methodName,
parameters, methodIntf);
        }
 
@@ -102,16 +102,10 @@
                       
methods.add(getQueryMethod(methodName, parameters,
entity.getEntityClass()));
                } else {
                        // interface element
-                       Class homeClass =
entity.getHomeClass(); // optional. might be null
-                       Class localClass =
entity.getLocalHomeClass(); // optional, might be null
-                       // check for both local and
home class and add the methods if found
-                       if(homeClass != null && (
methodIntf == null ||
methodIntf.equals(QueryMetaData.HOME)))
-                       {
-                               methods.add(
getQueryMethod(methodName, parameters, homeClass) );
-                       }
-                       if(localClass != null &&
(methodIntf == null ||
methodIntf.equals(QueryMetaData.LOCAL_HOME)))
-                       {
-                               methods.add(
getQueryMethod(methodName, parameters, localClass) );
+                       if(methodIntf == null ||
methodIntf.equals(QueryMetaData.HOME)) {
+                              
methods.add(getQueryMethod(methodName, parameters,
entity.getHomeClass()));
+                       } else if(methodIntf == null ||
methodIntf.equals(QueryMetaData.LOCAL_HOME)) {
+                              
methods.add(getQueryMethod(methodName, parameters,
entity.getLocalHomeClass()));
                        }
                }

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=444422&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to