Fix 11 ErrorProneStyle findings:

* These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
  (see http://go/bugpattern/UnnecessaryParentheses) (11 times)

This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/error-prone-bug for category ErrorProneStyle if there's an issue with the CL content.
* File a bug under go/rosie-bug if there's an issue with how the CL was managed.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.

This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/media/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/media/METADATA.
Anything wrong with the signup? File a bug at go/clrobot-bug.

#codehealth

Tested:
    Local presubmit tests passed.
PiperOrigin-RevId: 436726763
This commit is contained in:
olly 2022-03-23 13:55:36 +00:00 committed by Ian Baker
parent 831866f441
commit 76928738f3

View File

@ -1189,41 +1189,41 @@ public class DashManifestParser extends DefaultHandler
xpp.nextToken(); xpp.nextToken();
while (!XmlPullParserUtil.isEndTag(xpp, "Event")) { while (!XmlPullParserUtil.isEndTag(xpp, "Event")) {
switch (xpp.getEventType()) { switch (xpp.getEventType()) {
case (XmlPullParser.START_DOCUMENT): case XmlPullParser.START_DOCUMENT:
xmlSerializer.startDocument(null, false); xmlSerializer.startDocument(null, false);
break; break;
case (XmlPullParser.END_DOCUMENT): case XmlPullParser.END_DOCUMENT:
xmlSerializer.endDocument(); xmlSerializer.endDocument();
break; break;
case (XmlPullParser.START_TAG): case XmlPullParser.START_TAG:
xmlSerializer.startTag(xpp.getNamespace(), xpp.getName()); xmlSerializer.startTag(xpp.getNamespace(), xpp.getName());
for (int i = 0; i < xpp.getAttributeCount(); i++) { for (int i = 0; i < xpp.getAttributeCount(); i++) {
xmlSerializer.attribute( xmlSerializer.attribute(
xpp.getAttributeNamespace(i), xpp.getAttributeName(i), xpp.getAttributeValue(i)); xpp.getAttributeNamespace(i), xpp.getAttributeName(i), xpp.getAttributeValue(i));
} }
break; break;
case (XmlPullParser.END_TAG): case XmlPullParser.END_TAG:
xmlSerializer.endTag(xpp.getNamespace(), xpp.getName()); xmlSerializer.endTag(xpp.getNamespace(), xpp.getName());
break; break;
case (XmlPullParser.TEXT): case XmlPullParser.TEXT:
xmlSerializer.text(xpp.getText()); xmlSerializer.text(xpp.getText());
break; break;
case (XmlPullParser.CDSECT): case XmlPullParser.CDSECT:
xmlSerializer.cdsect(xpp.getText()); xmlSerializer.cdsect(xpp.getText());
break; break;
case (XmlPullParser.ENTITY_REF): case XmlPullParser.ENTITY_REF:
xmlSerializer.entityRef(xpp.getText()); xmlSerializer.entityRef(xpp.getText());
break; break;
case (XmlPullParser.IGNORABLE_WHITESPACE): case XmlPullParser.IGNORABLE_WHITESPACE:
xmlSerializer.ignorableWhitespace(xpp.getText()); xmlSerializer.ignorableWhitespace(xpp.getText());
break; break;
case (XmlPullParser.PROCESSING_INSTRUCTION): case XmlPullParser.PROCESSING_INSTRUCTION:
xmlSerializer.processingInstruction(xpp.getText()); xmlSerializer.processingInstruction(xpp.getText());
break; break;
case (XmlPullParser.COMMENT): case XmlPullParser.COMMENT:
xmlSerializer.comment(xpp.getText()); xmlSerializer.comment(xpp.getText());
break; break;
case (XmlPullParser.DOCDECL): case XmlPullParser.DOCDECL:
xmlSerializer.docdecl(xpp.getText()); xmlSerializer.docdecl(xpp.getText());
break; break;
default: // fall out default: // fall out