Skip to content

Commit

Permalink
Explicit zero allocation fast path
Browse files Browse the repository at this point in the history
  • Loading branch information
franz1981 authored and vietj committed Jan 27, 2023
1 parent b1a5b00 commit 46057ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/io/vertx/core/http/impl/HttpUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ static String parsePath(String uri) {
int queryStart = uri.indexOf('?', i);
if (queryStart == -1) {
queryStart = uri.length();
if (i == 0) {
return uri;
}
}
return uri.substring(i, queryStart);
}
Expand Down

0 comments on commit 46057ba

Please sign in to comment.