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/util BrokerHelper.java
Date Thu, 22 Apr 2004 19:23:45 GMT
brj         2004/04/22 12:23:45

  Modified:    src/java/org/apache/ojb/broker/util BrokerHelper.java
  Log:
  fixed NPE when criteria is null
  
  Revision  Changes    Path
  1.49      +8 -3      db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java
  
  Index: BrokerHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- BrokerHelper.java	21 Apr 2004 17:02:59 -0000	1.48
  +++ BrokerHelper.java	22 Apr 2004 19:23:45 -0000	1.49
  @@ -505,9 +505,14 @@
       {
           Class searchClass = aQuery.getSearchClass();
           ReportQueryByCriteria countQuery;
  -        // BRJ: copied Criteria without groupby, orderby, and prefetched relationships
  -        Criteria countCrit = aQuery.getCriteria().copy(false,false,false);
  +        Criteria countCrit = null;
           String[] columns = new String[1];
  +
  +        // BRJ: copied Criteria without groupby, orderby, and prefetched relationships
  +        if (aQuery.getCriteria() != null)
  +        {
  +            countCrit = aQuery.getCriteria().copy(false,false,false);
  +        }
   
           if(aQuery.isDistinct())
           {
  
  
  

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