diff --git a/README.md b/README.md index 6e3979e2..52887f75 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ See benchmarks [here](https://github.com/brettwooldridge/HikariCP/wiki/Benchmark com.zaxxer HikariCP - 1.2.8 + 1.2.9 compile ``` @@ -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) [![](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 above1. If you need legacy Java support, I recommend the Tomcat pool. + * Java 7 and above1. If you need legacy Java support, I recommend the BoneCP pool. * Javassist 3.18.1+ library * slf4j library diff --git a/src/main/java/com/zaxxer/hikari/util/FastStatementList.java b/src/main/java/com/zaxxer/hikari/util/FastStatementList.java index 951fc52c..b464ba35 100644 --- a/src/main/java/com/zaxxer/hikari/util/FastStatementList.java +++ b/src/main/java/com/zaxxer/hikari/util/FastStatementList.java @@ -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]; diff --git a/src/test/java/com/zaxxer/hikari/TestFastStatementList.java b/src/test/java/com/zaxxer/hikari/TestFastStatementList.java index 11aade42..b6142a21 100644 --- a/src/test/java/com/zaxxer/hikari/TestFastStatementList.java +++ b/src/test/java/com/zaxxer/hikari/TestFastStatementList.java @@ -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)); + } } }