Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3
-
None
-
None
-
New
Description
I try to use the CharArraySet for a filter I am writing. I heavily use char-arrays in my code to speed up things. I stumbled upon a bug in CharArraySet while doing that.
The method public boolean contains(char[] text, int off, int len) seems not to work.
When I do
if (set.contains(buffer,offset,length) {
...
}
my code fails.
But when I do
if (set.contains(new String(buffer,offset,length)) { ... }
everything works as expected.
Both variants should behave the same. I attach a small piece of code to show the problem.