Merge commit '4bf148f6d07efb03acc495ff52f1fea9dca649e1' into dev

* commit '4bf148f6d07efb03acc495ff52f1fea9dca649e1':
  fix fast statement list overflow inconsistency
  Update README.md
  Update README.md
pull/41/head
Brett Wooldridge 11 years ago
commit de20a9e71c

@ -31,7 +31,7 @@ See benchmarks [here](https://github.com/brettwooldridge/HikariCP/wiki/Benchmark
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>1.2.8</version>
<version>1.2.9</version>
<scope>compile</scope>
</dependency>
```
@ -263,7 +263,7 @@ Google discussion group [HikariCP here](https://groups.google.com/d/forum/hikari
[![](https://raw.github.com/wiki/brettwooldridge/HikariCP/twitter.png)](https://twitter.com/share?text=Interesting%20JDBC%20Connection%20Pool&hashtags=HikariCP&url=https%3A%2F%2Fgithub.com%2Fbrettwooldridge%2FHikariCP)&nbsp;[![](https://raw.github.com/wiki/brettwooldridge/HikariCP/facebook.png)](http://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fgithub.com%2Fbrettwooldridge%2FHikariCP&width&layout=standard&action=recommend&show_faces=true&share=false&height=80)
#### Requirements ####
* Java 7 and above<sup>1</sup>. If you need legacy Java support, I recommend the Tomcat pool.
* Java 7 and above<sup>1</sup>. If you need legacy Java support, I recommend the BoneCP pool.
* Javassist 3.18.1+ library
* slf4j library

@ -62,6 +62,7 @@ public final class FastStatementList
catch (ArrayIndexOutOfBoundsException oob)
{
// overflow-conscious code
size--;
int oldCapacity = elementData.length;
int newCapacity = oldCapacity << 2;
Statement[] newElementData = new Statement[newCapacity];

@ -1,5 +1,6 @@
package com.zaxxer.hikari;
import org.junit.Assert;
import org.junit.Test;
import com.zaxxer.hikari.performance.StubStatement;
@ -15,5 +16,9 @@ public class TestFastStatementList
{
list.add(new StubStatement());
}
for (int i = 0; i < 100; i++)
{
Assert.assertNotNull(list.get(i));
}
}
}

Loading…
Cancel
Save