diff options
author | kgui <kgui@google.com> | 2023-12-25 16:32:17 +0800 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-01-08 21:20:59 +0000 |
commit | 7ce9f5af9fd29b15e35d55419dad0f0fd0583c7c (patch) | |
tree | 41bdc8465c9a8d2d66b5637a5d210b1f01e9657f | |
parent | 8d3d8a8c9fee869479cfcf9ff59b87b90204dde5 (diff) | |
download | google-smali-7ce9f5af9fd29b15e35d55419dad0f0fd0583c7c.tar.gz |
Throw out a DexFileNotFoundException if the dexFile of a DexEntry is null.
Which is consistent with the API's annotation that getDexFile() returns an non-null object.
Bug: 317075756
Test: locally via: $ make dist cts-api-coverage
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1706ee3aaffd7675999cad15fb3b1cb72af2ff89)
Merged-In: I3cac4bd2dd9c378faa1cf6212f06f495c8fd954b
Change-Id: I3cac4bd2dd9c378faa1cf6212f06f495c8fd954b
-rw-r--r-- | dexlib2/src/main/java/com/android/tools/smali/dexlib2/DexFileFactory.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dexlib2/src/main/java/com/android/tools/smali/dexlib2/DexFileFactory.java b/dexlib2/src/main/java/com/android/tools/smali/dexlib2/DexFileFactory.java index f59b1070..786ae4e0 100644 --- a/dexlib2/src/main/java/com/android/tools/smali/dexlib2/DexFileFactory.java +++ b/dexlib2/src/main/java/com/android/tools/smali/dexlib2/DexFileFactory.java @@ -394,7 +394,7 @@ public final class DexFileFactory { if (exactMatch) { try { MultiDexContainer.DexEntry<? extends DexBackedDexFile> entry = dexContainer.getEntry(targetEntry); - if (entry == null) { + if (entry == null || entry.getDexFile() == null) { throw new DexFileNotFoundException("Could not find entry %s in %s.", targetEntry, filename); } return entry; |