diff options
author | Andreas Gampe <agampe@google.com> | 2017-10-10 08:01:38 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2017-10-10 08:06:42 -0700 |
commit | 009b8521338b6c89335563c961ec9beefec9b5c7 (patch) | |
tree | 62ba92c3b4626b8c21b23fc7412689164cd2273a /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | a162726df7ada6a1e55143dce8745c85aa562bd0 (diff) |
Parcel: Avoid NPE in finalization
Check whether the guard is null to avoid:
Uncaught exception thrown by finalizer
java.lang.NullPointerException: Attempt to invoke virtual method 'void dalvik.system.CloseGuard.close()' on a null object reference
at android.os.ParcelFileDescriptor.closeWithStatus(ParcelFileDescriptor.java:740)
at android.os.ParcelFileDescriptor.finalize(ParcelFileDescriptor.java:990)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:250)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:237)
at java.lang.Daemons$Daemon.run(Daemons.java:103)
at java.lang.Thread.run(Thread.java:764)
Follow-up to commit da5a3e12f4f8f965c57d6f93c74190f43ea233f3.
Bug: 7426029
Bug: 10330121
Test: m
Change-Id: I903f1545ab784008727ff23bb95fe182bd95b62a
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions