orpiske commented on code in PR #12284: URL: https://github.com/apache/camel/pull/12284#discussion_r1411901394
########## components/camel-vertx/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpEndpoint.java: ########## @@ -60,18 +61,23 @@ public VertxHttpComponent getComponent() { @Override protected void doInit() throws Exception { String range = configuration.getOkStatusCodeRange(); + parseStatusRange(range); + } + + private void parseStatusRange(String range) { if (!range.contains(",")) { - // default is 200-299 so lets optimize for this - if (range.contains("-")) { - minOkRange = Integer.parseInt(StringHelper.before(range, "-")); - maxOkRange = Integer.parseInt(StringHelper.after(range, "-")); - } else { + if (!HttpUtil.parseStatusRange(range, this::setRanges)) { minOkRange = Integer.parseInt(range); maxOkRange = minOkRange; } } } + private void setRanges(int minOkRange, int maxOkRange) { Review Comment: Yes it is. It's referenced on line 69, by the `parseStatusRange`. -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org