summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2018-04-19 16:11:05 +0100
committerTobias Thierer <tobiast@google.com>2018-04-26 14:26:16 +0100
commita599c6c553aee86dd5a15db3e71d6d4cee7a5fd4 (patch)
tree5c8ff2f9d2b4b75654f29cb392070f0adf4d3b9d /annotations/generate_annotated_java_files.py
parentb04695b5e98b4a2a1dcae5fc4e088fc359bf567f (diff)
Log when duplicate elements are first added to DexPathList.
Bug 77342775 involves duplicate paths appearing on a DexPathList (used by PathClassLoader), but it's not clear whether they're present when the DexPathList is first constructed or whether they're added later. Further, it's not clear via which call chain they are added. This CL adds logging at the point where duplicate paths are first added, including a stacktrace of the call stack. Adding additional (non-duplicate) elements to a DexPathList that already contains duplicates does not trigger further logging. A helper method getElementPath() is used to extract the path from an Element without calling Element.toString(). The code was written (and tested) to tolerate the case of the path being null, although this shouldn't ever happen in practice. Such null elements are ignored for purposes of identifying duplicates. Bug: 77342775 Test: Device boots Test: Extracted the checkForDuplicates() logic together with a fake implementation of Element / getElementPath(), and manually checked in a small test program that it behaved as expected for a few test cases. Change-Id: Ifd79bf213d25bbe6653ffdf329cc7acac42c95b5
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions