dsmiley commented on code in PR #2469: URL: https://github.com/apache/solr/pull/2469#discussion_r1623101435
########## solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java: ########## @@ -58,7 +59,21 @@ public enum SolrRequestType { SECURITY, ADMIN, STREAMING, - UNSPECIFIED + UNSPECIFIED; + + public static SolrRequestType parse(String s) { + if (s == null) return QUERY; + + s = s.toUpperCase(Locale.ROOT); + if (QUERY.toString().equals(s)) return QUERY; + if (UPDATE.toString().equals(s)) return UPDATE; + if (ADMIN.toString().equals(s)) return ADMIN; + if (STREAMING.toString().equals(s)) return STREAMING; + if (UNSPECIFIED.toString().equals(s)) return UNSPECIFIED; Review Comment: See `Enum.valueOf(...)` -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org