|
[
Permlink
| « Hide
]
Ben added a comment - 03/Oct/06 11:11 PM
Using commons-validator-1.3.0.jar - Version 1.3.0 of commons validator
Problem is that in that method an array of fixed size 10 is created. The patch resolves this by making the size of the array be the number of '.'s in the hostIP + 1.
Seems hacky ArrayList seemed like a 'doh' moment, but digging into it it's a bit of a pain to code.
You can't use set as you have to use add the first time in an ArrayList; so the code would need a large change. When I was looking at this class there were a number of bits that were jumping up and down saying "RECODE ME!", See
svn ci -m "Fixing ArrayOutOfBoundsException bug reported in #
Sending src/share/org/apache/commons/validator/UrlValidator.java |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||