Re: [DBCP] Odd code in SharedPoolDataSource.getPooledConnectionAndInfo()

2010-01-14 Thread sebb
On 14/01/2010, sebb wrote: > On 14/01/2010, Phil Steitz wrote: > > Phil Steitz wrote: > > > sebb wrote: > > >> The method SharedPoolDataSource.getPooledConnectionAndInfo has the > > >> following code: > > >> > > >> synchronized (userKeys) { > > >> if (user

Re: [DBCP] Odd code in SharedPoolDataSource.getPooledConnectionAndInfo()

2010-01-14 Thread sebb
On 14/01/2010, Phil Steitz wrote: > Phil Steitz wrote: > > sebb wrote: > >> The method SharedPoolDataSource.getPooledConnectionAndInfo has the > >> following code: > >> > >> synchronized (userKeys) { > >> if (userKeys.containsKey(username)) { > >>

Re: [DBCP] Odd code in SharedPoolDataSource.getPooledConnectionAndInfo()

2010-01-14 Thread Phil Steitz
Phil Steitz wrote: > sebb wrote: >> The method SharedPoolDataSource.getPooledConnectionAndInfo has the >> following code: >> >> synchronized (userKeys) { >> if (userKeys.containsKey(username)) { >> userKeys.remove(username); >> } >>

Re: [DBCP] Odd code in SharedPoolDataSource.getPooledConnectionAndInfo()

2010-01-13 Thread Phil Steitz
sebb wrote: > The method SharedPoolDataSource.getPooledConnectionAndInfo has the > following code: > > synchronized (userKeys) { > if (userKeys.containsKey(username)) { > userKeys.remove(username); > } > } > > Why not jus

[DBCP] Odd code in SharedPoolDataSource.getPooledConnectionAndInfo()

2010-01-13 Thread sebb
The method SharedPoolDataSource.getPooledConnectionAndInfo has the following code: synchronized (userKeys) { if (userKeys.containsKey(username)) { userKeys.remove(username); } } Why not just use userKeys.remove(username)?