Permalink
Browse files

Fixed bug when vetting params.

Was using a for condition of i < size (where size was pre-calced), but
as the list could shrink WHILE being iterated on (items removed) this
caused a likely ArrayIndexOutOfBounds exception.
  • Loading branch information...
1 parent e4a739e commit e90d8217b1fc1b4bd2f0ca700baf8fd9227af654 Riyad Kalla committed Jul 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/thebuzzmedia/common/crypto/OAuthSigner.java
@@ -390,7 +390,7 @@ public OAuthSigner params(List<String[]> paramList, ParamFilter filter) {
// Filter the param list if a filter was provided.
if (filter != null) {
- for (int i = 0, size = paramList.size(); i < size; i++) {
+ for (int i = 0; i < paramList.size(); i++) {
String[] pair = paramList.get(i);
if (pair != null

0 comments on commit e90d821

Please sign in to comment.