Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d71cd85c authored by Michael Wright's avatar Michael Wright Committed by Gerrit Code Review
Browse files

Merge "check-flagged-apis: add missing requireNotNull" into main

parents 68d63d47 04e4564f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -207,7 +207,10 @@ internal fun parseApiVersions(input: InputStream): Set<Symbol> {
  // ktfmt doesn't understand the `..<` range syntax; explicitly call .rangeUntil instead
  for (i in 0.rangeUntil(fields.getLength())) {
    val field = fields.item(i)
    val fieldName = field.getAttribute("name")
    val fieldName =
        requireNotNull(field.getAttribute("name")) {
          "Bad XML: <field> element without name attribute"
        }
    val className =
        requireNotNull(field.getParentNode()) { "Bad XML: top level <field> element" }
            .getAttribute("name")