This problem is reported by the Findbugs tool.
package org.apache.pdfbox.cos;
public class COSString extends COSBase
public int hashCode()
{
return getBytes().hashCode();
}
Invocation of hashCode on an array
The code invokes hashCode on an array. Calling hashCode on an array
returns the same value as System.identityHashCode, and ignores the
contents and length of the array. If you need a hashCode that depends on
the contents of an array a, use java.util.Arrays.hashCode(a).
This might be a better solution.
public int hashCode()
{
return java.util.Arrays.hashCode (getBytes());
}