去掉多余代码

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@572 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-09-02 15:18:01 +00:00
parent f1728d20e2
commit 347d17420b
@@ -315,18 +315,15 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
connectCount++;
ConnectionHolder holder;
for (;;) {
if (maxWait > 0) {
holder = pollLast(maxWait, TimeUnit.MILLISECONDS);
} else {
holder = takeLast();
}
if (holder == null) {
throw new SQLException("can not get connection");
}
if (maxWait > 0) {
holder = pollLast(maxWait, TimeUnit.MILLISECONDS);
} else {
holder = takeLast();
}
break;
if (holder == null) {
throw new SQLException("can not get connection");
}
holder.incrementUseCount();