Fwd: Re: [kaffe] java.sql.*

Ito Kazumitsu ito.kazumitsu at hitachi-cable.co.jp
Thu Apr 10 01:29:01 PDT 2003


In message "Fwd: Re: [kaffe] java.sql.*"
    on 03/04/09, Dalibor Topic <robilad at yahoo.com> writes:

> > If you want to go ahead, you can review the
> > exceptions
> > form kaffe's java.sql implementation and
> > classpath's.

This is the results of my review:

1. Exceptions only GNU Classpath's java.sql throws

   Omitted (too many to show here).  They are all
   SQLException. Most of them are supposed to be thrown by
   methods added since 1.2,  which kaffe does not implement.

2. Exceptions only kaffe's java.sql throws

Date:    public static java.sql.Date valueOf(java.lang.String) throws java.lang.IllegalArgumentException
DriverManager:    public static synchronized java.sql.Connection getConnection(java.lang.String) throws java.sql.SQLException
DriverManager:    public static synchronized java.sql.Connection getConnection(java.lang.String, java.lang.String, java.lang.String) throws java.sql.SQLException
DriverManager:    public static synchronized java.sql.Connection getConnection(java.lang.String, java.util.Properties) throws java.sql.SQLException
DriverManager:    public static synchronized void registerDriver(java.sql.Driver) throws java.sql.SQLException
Time:    public static java.sql.Time valueOf(java.lang.String) throws java.lang.IllegalArgumentException
Timestamp:    public static java.sql.Timestamp valueOf(java.lang.String) throws java.lang.IllegalArgumentException

  Kaffe's Date and Time throwing IllegalArgumentException is not
  conforming to Sun's API document.

  GNU classpath's Timestamp not throwing IllegalArgumentException
  is not conforming to Sun's API document.

  As for DriverManager, they are listed here because of the
  differrnce of getConnection methods.  Kaffe's declare synchronized
  but GNU classpath's does not.

3. Differnce of SQLException

  The following methods are quite different.

Kaffe's
public synchronized void setNextException(SQLException ex) {
        if (next == null) {
                next = ex;
        }
        else {
                next.setNextException(ex);
        }
}

GNU Classpath's
  public void setNextException(SQLException e)
  {
    if (e == null)
      return;

    SQLException list_entry = this;
    while (list_entry.getNextException() != null)
      list_entry = list_entry.getNextException();

    list_entry.next = e;
  }




More information about the kaffe mailing list