Skip to content

Commit

Permalink
fix #72
Browse files Browse the repository at this point in the history
  • Loading branch information
jokermonn authored and JakeWharton committed Jan 14, 2022
1 parent ef83fc4 commit 7481ff5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ class AndroidManifest private constructor(
when (chunk) {
is XmlNamespaceStartChunk -> {
check(namespacesToAdd.put(chunk.prefix, chunk.uri) == null)
check(namespacesInScope.put(chunk.uri, "${chunk.prefix}:") == null)
val newPrefix = "${chunk.prefix}:"
val oldPrefix = namespacesInScope.put(chunk.uri, newPrefix)
check(oldPrefix == null || oldPrefix == newPrefix)
}
is XmlStartElementChunk -> {
val canonicalNamespace = chunk.namespace.takeIf(String::isNotEmpty)
Expand Down

0 comments on commit 7481ff5

Please sign in to comment.