linkedin / dexmaker

A utility for doing compile or runtime code generation targeting Android's Dalvik VM
Apache License 2.0
1.88k stars 249 forks source link

Switch to BufferedOutputStream in DexMaker.java #142

Closed JuliaSull closed 5 years ago

JuliaSull commented 5 years ago

Android's StrictMode will throw exceptions and crash because this file uses unbuffered io. This switches to BufferedOutputStream and adds try/finally blocks to ensure subsequent errors are prevented should something fail.

This can be seen using mockito's mock() and spy() functions.

moltmann commented 5 years ago

The change looks reasonable to me