Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000453 [Resin] minor always 11-13-05 00:00 12-07-05 15:28
Reporter karlgold View Status public  
Assigned To
Priority normal Resolution fixed  
Status closed   Product Version 3.0.14
Summary 0000453: com.caucho.sql.UserConnection.isClosed() throws IllegalStateException when connection is closed
Description RSN-502
com.caucho.sql.UserConnection.isClosed() does this:

<snip>
 return getMConn() == null || getConnection() == null || getConnection().isClosed();
</snip>

getMConn() does this:

<snip>
  private ManagedConnectionImpl getMConn()
  {
    ManagedConnectionImpl mConn = _mConn;
    
    if (mConn == null)
      throw new IllegalStateException("connection is closed");

    return mConn;
  }
</snip>

thus, isClosed throws an IllegalStateException if _mConn is null. It seems like what you really want in isClosed() is something like:

<snip>
 return _mConn == null || getConnection() == null || getConnection().isClosed();
</snip>

Additional Information Any
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
11-13-05 00:00 karlgold New Issue
12-07-05 15:28 ferg Status acknowledged => closed
12-07-05 15:28 ferg Resolution open => fixed
12-07-05 15:28 ferg Fixed in Version  => 3.0.16


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker