Skip to content

Commit 0cbb487

Browse files
committed
SuppressFBWarnings for switch-case
1 parent 8325607 commit 0cbb487

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/hudson/plugins/robot/RobotParser.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package hudson.plugins.robot;
1717

18+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
1819
import hudson.AbortException;
1920
import hudson.FilePath;
2021
import hudson.Util;
@@ -469,6 +470,7 @@ private String processBranch(XMLStreamReader reader, int nestedCount) throws XML
469470
return stackTrace.toString();
470471
}
471472

473+
@SuppressFBWarnings("SF_SWITCH_FALLTHROUGH")
472474
private String processKeyword(XMLStreamReader reader, int nestedCount) throws XMLStreamException {
473475
StringBuilder stackTrace = new StringBuilder();
474476
String kw = reader.getAttributeValue(null, "name");
@@ -485,6 +487,7 @@ private String processKeyword(XMLStreamReader reader, int nestedCount) throws XM
485487
case "arguments":
486488
case "arg":
487489
stackTrace.append(processArgs(reader));
490+
// TODO: Refactor processArgs, so it won't return <kw> element and we can break out of this switch case normally and remove the SuppressFBWarnings above
488491
continue; // processArgs returns with us already in <kw>. We don't want to use reader.next()
489492
case "for":
490493
case "while":

0 commit comments

Comments
 (0)