-
Evan W. Patton authored
When an obfuscated text is used in an application with memory pressure, the iteration over the obfuscated string can cause a NullPointerException to be thrown from gnu.text.CharMap. The CharMap uses weak references to Char objects to make Chars eq?. However, Kawa does not check whether the Char returned from the WeakReference.get() method is null and then attempts to take its intValue(). In applications where there is little memory pressure the WeakReferences are unlikely to be GCed so we don't normally observe this erroroneous behavior. This commit updates kawa-1.11-modified.jar with a check whether the Char returned by the WeakReference is null prior to taking the intValue(). If the Char is null, it will fall through to recreate the Char and add it to the CharMap. Change-Id: Idb19540b6096a9609a8aa06e77d628cd3ce1dc6b
f28861e2