We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f347784 commit a440196Copy full SHA for a440196
java/ql/lib/semmle/code/java/Statement.qll
@@ -559,9 +559,7 @@ class PatternCase extends SwitchCase {
559
/**
560
* Gets this case's sole pattern, if there is exactly one.
561
*/
562
- PatternExpr getUniquePattern() {
563
- result = unique(PatternExpr pe | pe = this.getPatternAtIndex(_))
564
- }
+ PatternExpr getUniquePattern() { result = unique(PatternExpr pe | pe = this.getAPattern()) }
565
566
/** Gets the guard applicable to this pattern case, if any. */
567
Expr getGuard() { result.isNthChildOf(this, -3) }
0 commit comments