Skip to content

Commit

Permalink
HSEARCH-3816 Sonar: "indexOf" checks should not be for positive numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Jan 27, 2020
1 parent e2a1454 commit 993910b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -40,7 +40,7 @@ static ServerUris fromStrings(String protocol, List<String> hostAndPortStrings)
}

private static HttpHost createHttpHost(String scheme, String hostAndPort) {
if ( hostAndPort.indexOf( "://" ) > 0 ) {
if ( hostAndPort.indexOf( "://" ) >= 0 ) {
throw log.invalidHostAndPort( hostAndPort, null );
}
String host;
Expand Down

0 comments on commit 993910b

Please sign in to comment.