diff --git a/src/main/java/com/google/devtools/build/lib/query2/query/output/XmlOutputFormatter.java b/src/main/java/com/google/devtools/build/lib/query2/query/output/XmlOutputFormatter.java index a6ddf0e814656c..83dcd8b4296643 100644 --- a/src/main/java/com/google/devtools/build/lib/query2/query/output/XmlOutputFormatter.java +++ b/src/main/java/com/google/devtools/build/lib/query2/query/output/XmlOutputFormatter.java @@ -308,11 +308,6 @@ private void addStarlarkFilesToElement( */ private static Element createValueElement( Document doc, Type type, Iterable values, LabelPrinter labelPrinter) { - // "Import static" with method scope: - Type LABEL_LIST = BuildType.LABEL_LIST; - Type LICENSE = BuildType.LICENSE; - Type STRING_LIST = Types.STRING_LIST; - final Element elem; final boolean hasMultipleValues = Iterables.size(values) > 1; Type elemType = type.getListElementType(); @@ -339,18 +334,18 @@ private static Element createValueElement( } } } - } else if (type == LICENSE) { + } else if (type == BuildType.LICENSE) { elem = createSingleValueElement(doc, "license", hasMultipleValues); if (!hasMultipleValues) { License license = (License) Iterables.getOnlyElement(values); Element exceptions = - createValueElement(doc, LABEL_LIST, license.getExceptions(), labelPrinter); + createValueElement(doc, BuildType.LABEL_LIST, license.getExceptions(), labelPrinter); exceptions.setAttribute("name", "exceptions"); elem.appendChild(exceptions); Element licenseTypes = - createValueElement(doc, STRING_LIST, license.getLicenseTypes(), labelPrinter); + createValueElement(doc, Types.STRING_LIST, license.getLicenseTypes(), labelPrinter); licenseTypes.setAttribute("name", "license-types"); elem.appendChild(licenseTypes); }