|
Our test case is our enterprise-class application. I'd send it to you if I could. It's been running without a hitch for years, all the way up to and including 4.3.0.
I had a look at the source code myself and I can tell you what's happening.
Line 78 of TypedValue (as indicated in the stack trace) returns the value for hashCode() ...
public int hashCode() {
return hashcode.getValue();
}
The only way an NPE could be thrown is if the "hashcode" member variable is null. Let's look at that member variable's comment and definition on lines 41-42 ...
private final transient ValueHolder<Integer> hashcode;
Because it's marked transient hashcode won't get serialized. When TypedValue is de-serialized the hashcode member reference is null. I believe that the transient modifier was added back in 4.3.2 to resolve a serialization problem because ValueHolder isn't serializable.
There are three possible fixes. Don't use ValueHolder for the hashcode member variable, or remove the transient modifier and modify ValueHolder to be serializable, or make TypedValue.hashCode() null-safe like this ...
public int hashCode() {
return hashcode == null ? 0 : hashcode.getValue();
}
|