james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From charl...@apache.org
Subject cvs commit: jakarta-james/proposals/v1.3/java/org/apache/james/userrepository UsersJDBCRepository.java
Date Mon, 11 Jun 2001 08:51:27 GMT
charlesb    01/06/11 01:51:26

  Modified:    proposals/v1.3/java/org/apache/james/userrepository
                        UsersJDBCRepository.java
  Log:
  Fix for mm mysql driver handling of PreparedStatement.setBoolean()
  
  Revision  Changes    Path
  1.2       +11 -11    jakarta-james/proposals/v1.3/java/org/apache/james/userrepository/UsersJDBCRepository.java
  
  Index: UsersJDBCRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/proposals/v1.3/java/org/apache/james/userrepository/UsersJDBCRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UsersJDBCRepository.java	2001/06/10 13:19:57	1.1
  +++ UsersJDBCRepository.java	2001/06/11 08:51:25	1.2
  @@ -84,10 +84,10 @@
           // Load the driver.
   
           String driverName = configuration.getChild("destination").getChild("driver").getAttribute("class");
  -	getLogger().debug("Loading driver :" + driverName);
  +        getLogger().debug("Loading driver :" + driverName);
           try {
               Class.forName(driverName);
  -	    getLogger().info("Database driver " + driverName + " loaded");
  +            getLogger().info("Database driver " + driverName + " loaded");
           } 
           catch ( ClassNotFoundException cnfe ) {
               throw new ConfigurationException("Could not load specified driver - " + driverName);
  @@ -137,7 +137,7 @@
                   PreparedStatement createStatement = conn.prepareStatement(m_createUserTableSql);
                   createStatement.execute();
                   createStatement.close();
  -		getLogger().info("Created \'JamesUsers\' table.");
  +                getLogger().info("Created \'JamesUsers\' table.");
                   System.out.println("UsersStore - UsersJDBCRepository : Created \'JamesUsers\'
table.");
               }
           }
  @@ -209,13 +209,13 @@
           String username = user.getUserName();
           String pwdHash = user.getHashedPassword();
           String pwdAlgorithm = user.getHashAlgorithm();
  -        boolean useForwarding = user.getForwarding();
  +        int useForwarding = user.getForwarding() ? 1 : 0;
           MailAddress forwardAddress = user.getForwardingDestination();
           String forwardDestination = null;
           if ( forwardAddress != null ) {
               forwardDestination = forwardAddress.toString();
           }
  -        boolean useAlias = user.getAliasing();
  +        int useAlias = user.getAliasing() ? 1 : 0;
           String alias = user.getAlias();
   
           Connection conn = getConnection();
  @@ -227,9 +227,9 @@
               addUserStatement.setString(1, username);
               addUserStatement.setString(2, pwdHash);
               addUserStatement.setString(3, pwdAlgorithm);
  -            addUserStatement.setBoolean(4, useForwarding);
  +            addUserStatement.setInt(4, useForwarding);
               addUserStatement.setString(5, forwardDestination);
  -            addUserStatement.setBoolean(6, useAlias);
  +            addUserStatement.setInt(6, useAlias);
               addUserStatement.setString(7, alias);
   
               addUserStatement.execute();
  @@ -342,13 +342,13 @@
           String username = user.getUserName();
           String pwdHash = user.getHashedPassword();
           String pwdAlgorithm = user.getHashAlgorithm();
  -        boolean useForwarding = user.getForwarding();
  +        int useForwarding = user.getForwarding() ? 1 : 0;
           MailAddress forwardAddress = user.getForwardingDestination();
           String forwardDestination = null;
           if ( forwardAddress != null ) {
               forwardDestination = forwardAddress.toString();
           }
  -        boolean useAlias = user.getAliasing();
  +        int useAlias = user.getAliasing() ? 1 : 0;
           String alias = user.getAlias();
   
           Connection conn = getConnection();
  @@ -359,9 +359,9 @@
               
               updateUserStatement.setString(1, pwdHash);
               updateUserStatement.setString(2, pwdAlgorithm);
  -            updateUserStatement.setBoolean(3, useForwarding);
  +            updateUserStatement.setInt(3, useForwarding);
               updateUserStatement.setString(4, forwardDestination);
  -            updateUserStatement.setBoolean(5, useAlias);
  +            updateUserStatement.setInt(5, useAlias);
               updateUserStatement.setString(6, alias);
               updateUserStatement.setString(7, username);
   
  
  
  

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


Mime
View raw message