portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/om/security/turbine TurbineUserPeer.java
Date Mon, 23 May 2005 21:51:14 GMT
taylor      2005/05/23 14:51:14

  Modified:    src/java/org/apache/jetspeed/om/security/turbine
                        TurbineUserPeer.java
  Log:
  MYSQL only (3.1.x) bug, just found today:
  Nasty village was inserting 000000000 for dates when null, then it couldn't reread its own
shit it put in the database. got around this by explicity setting the dates with problems
(CREATED, PASSWORD_CREATED)
  
  Revision  Changes    Path
  1.9       +11 -0     jakarta-jetspeed/src/java/org/apache/jetspeed/om/security/turbine/TurbineUserPeer.java
  
  Index: TurbineUserPeer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/om/security/turbine/TurbineUserPeer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TurbineUserPeer.java	26 Jun 2004 01:24:55 -0000	1.8
  +++ TurbineUserPeer.java	23 May 2005 21:51:14 -0000	1.9
  @@ -17,6 +17,7 @@
   package org.apache.jetspeed.om.security.turbine;
   
   import java.util.ArrayList;
  +import java.util.Date;
   import java.util.Hashtable;
   import java.util.List;
   
  @@ -315,6 +316,16 @@
                                 permData.remove(TurbineUserPeer.columnNames[i]) );
               }
           }
  +        
  +        // fix for MySQL failing to retrieve bad values generated by Village
  +        Date created = user.getCreateDate();
  +        if (created == null)
  +        {
  +            created = new Date();
  +        }
  +        criteria.add( "TURBINE_USER.CREATED", created);
  +        criteria.add( "TURBINE_USER.PASSWORD_CHANGED", created);
  +        
           String dataKey = new StringBuffer(TABLE_NAME).append('.').append(TURBINE_OBJECTDATA).toString();
           criteria.add( dataKey, permData );
           return criteria;
  
  
  

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


Mime
View raw message