db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql TableAliasHandler.java
Date Thu, 10 Nov 2005 21:10:18 GMT
brj         2005/11/10 13:10:18

  Modified:    src/java/org/apache/ojb/broker/accesslayer/sql
                        TableAliasHandler.java
  Log:
  avoid NPE in isMNAlias
  
  Revision  Changes    Path
  1.13      +4 -4      db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/TableAliasHandler.java
  
  Index: TableAliasHandler.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/sql/TableAliasHandler.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TableAliasHandler.java	28 Oct 2005 20:30:06 -0000	1.12
  +++ TableAliasHandler.java	10 Nov 2005 21:10:18 -0000	1.13
  @@ -88,7 +88,7 @@
        */
       static boolean isMNAlias(TableAlias aTableAlias)
       {
  -        return aTableAlias.cld == null && M_N_ALIAS.equals(aTableAlias.alias);
  +        return aTableAlias != null && aTableAlias.cld == null && M_N_ALIAS.equals(aTableAlias.alias);
       }
   
       TableAliasHandler(TableAliasHandler parent, QueryByCriteria aQuery, ClassDescriptor
searchCld, Logger logger)
  @@ -455,8 +455,8 @@
   			{
   				List hintClasses = (List) pathClasses.get(aPath);
                   
  -//                ClassDescriptor relCld = ((FieldDescriptor)keys[0]).getClassDescriptor();
 // TEST
  -//                curr = createTableAlias(relCld, attrPath, pathAlias, hintClasses);
  +//              ClassDescriptor relCld = ((FieldDescriptor)keys[0]).getClassDescriptor();
 // TEST
  +//              curr = createTableAlias(relCld, attrPath, pathAlias, hintClasses);
                   
                   curr = createTableAlias(cld, attrPath, pathAlias, hintClasses);
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message