Throw an exception if we could not open a converter.
In order to rule out the address being null in crashes such as:
dalvik.system.InMemoryDexClassLoaderTest#test_oneDexDirect_callInstanceMethod
java.lang.IllegalArgumentException: Non-positive averageBytesPerChar
at java.nio.charset.CharsetEncoder.<init>(CharsetEncoder.java:205)
at java.nio.charset.CharsetEncoderICU.<init>(CharsetEncoderICU.java:97)
at java.nio.charset.CharsetEncoderICU.newInstance(CharsetEncoderICU.java:75)
Seen here:
http://build.chromium.org/p/client.art/builders/bullhead-armv8-gcstress-ndebug/builds/1
bug: 62612946
Test: run-libcore-tests
Change-Id: Idde0b5f6a83cb7e54e9ab1f6ba22d394fb67aa18
1 file changed