Skip to content
Snippets Groups Projects
Commit a1b5f311 authored by Tor Norbye's avatar Tor Norbye Committed by android-build-merger
Browse files

124811433: ConcurrentModificationException in './gradlew updateApi'

am: 77adac31

Change-Id: I505c2eb0e0527da6e1eebcace7cd141d75cfae47
parents 5d5a752b 77adac31
No related branches found
No related tags found
No related merge requests found
...@@ -301,7 +301,12 @@ class ApiAnalyzer( ...@@ -301,7 +301,12 @@ class ApiAnalyzer(
} }
fun generateInheritedStubs(filterEmit: Predicate<Item>, filterReference: Predicate<Item>) { fun generateInheritedStubs(filterEmit: Predicate<Item>, filterReference: Predicate<Item>) {
packages.allClasses().forEach { // When analyzing libraries we may discover some new classes during traversal; these aren't
// part of the API but may be super classes or interfaces; these will then be added into the
// package class lists, which could trigger a concurrent modification, so create a snapshot
// of the class list and iterate over it:
val allClasses = packages.allClasses().toList()
allClasses.forEach {
if (filterEmit.test(it)) { if (filterEmit.test(it)) {
generateInheritedStubs(it, filterEmit, filterReference) generateInheritedStubs(it, filterEmit, filterReference)
} }
......
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
# Version definition # Version definition
# This file is read by gradle build scripts, but also packaged with metalava # This file is read by gradle build scripts, but also packaged with metalava
# as a resource for the Version classes to read. # as a resource for the Version classes to read.
metalavaVersion=1.2.8 metalavaVersion=1.2.9
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment