epugh commented on code in PR #3920:
URL: https://github.com/apache/solr/pull/3920#discussion_r2626557720
##########
solr/test-framework/src/java/org/apache/solr/search/facet/DebugAgg.java:
##########
@@ -38,14 +38,12 @@ public ValueSource parse(FunctionQParser fp) throws
SyntaxError {
parses.incrementAndGet();
final String what = fp.hasMoreArguments() ? fp.parseId() : "wrap";
- switch (what) {
- case "wrap":
- return new DebugAgg(fp);
- case "numShards":
- return new DebugAggNumShards();
- default: /* No-Op */
- }
- throw new RuntimeException("No idea what to do with " + what);
+ /* No-Op */
+ return switch (what) {
Review Comment:
;-). switch I like!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]