Anonymous | Login | Signup for a new account | 12-17-2024 10:33 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002094 | [Quercus] | minor | always | 10-19-07 14:02 | 10-19-07 16:20 | ||||
Reporter | koreth | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.1.3 | ||||||
Summary | 0002094: Null pointer exception in Env.getConnection() | ||||||||
Description |
Since I can't reopen a bug: The patch I provided in bug 2093 was actually for the section of code below the one that was updated in svn revision 3265. That revision doesn't solve the NPE I was seeing. Updated patch that is more consistent with the code style of rev 3265: --- a/modules/quercus/src/com/caucho/quercus/env/Env.java +++ b/modules/quercus/src/com/caucho/quercus/env/Env.java @@ -695,9 +695,9 @@ public class Env { Connection conn; - if (oldEntry != null && ! oldEntry.getConnection().isClosed()) - conn = oldEntry.getConnection(); - else { + if (oldEntry == null + || (conn = oldEntry.getConnection()) == null + || conn.isClosed()) { if (userName == null || userName.equals("")) conn = database.getConnection(); else Also, it seems to me that the "_connMap.put()" call should be inside the "else" (in the pre-patched version of the code) rather than unconditional like it is now; the current code is adding a map entry for a ConnectionEntry that has no connection assigned to it whenever the oldEntry connection is used. But it's possible that's as intended. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
There are no notes attached to this issue. |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed. 25 unique queries executed. |