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 Mon, 14 Nov 2005 17:45:54 GMT
brj         2005/11/14 09:45:54

  Modified:    src/java/org/apache/ojb/broker/accesslayer/sql
                        TableAliasHandler.java
  Log:
  prevent NPE in getTableAlias()
  
  Revision  Changes    Path
  1.15      +9 -5      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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TableAliasHandler.java	12 Nov 2005 17:59:44 -0000	1.14
  +++ TableAliasHandler.java	14 Nov 2005 17:45:54 -0000	1.15
  @@ -368,11 +368,15 @@
   		ArrayList descriptors;
   		boolean outer = useOuterJoins;
   		int pathLength;
  -
  -        List hintClasses = (List) pathClasses.get(aPath);
  -		String pathAlias = aUserAlias == null ? null : aUserAlias.getAlias(aPath); 
  +        List hintClasses = null;       
  +        String pathAlias = aUserAlias == null ? null : aUserAlias.getAlias(aPath);
  +        
  +        if (pathClasses != null)
  +        {
  +            hintClasses = (List) pathClasses.get(aPath);
  +        }    
  +        
   		curr = getTableAliasForPath(aPath, pathAlias, hintClasses);
  -
   		if (curr != null)
   		{
   			return curr;
  
  
  

---------------------------------------------------------------------
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