Mercurial > hg > monetdb-java
diff src/main/java/org/monetdb/client/JMonetDB.java @ 698:6beecac8aa1b
Use indexOf(char) instead of indexOf(String) where possible.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 24 Nov 2022 14:35:52 +0100 (2022-11-24) |
parents | 6aa38e8c0f2d |
children | aeb268156580 |
line wrap: on
line diff
--- a/src/main/java/org/monetdb/client/JMonetDB.java +++ b/src/main/java/org/monetdb/client/JMonetDB.java @@ -96,8 +96,8 @@ public final class JMonetDB { // build the hostname String host = copts.getOption("host").getArgument(); String sport = copts.getOption("port").getArgument(); - int pos; - if ((pos = host.indexOf(":")) != -1) { + int pos = host.indexOf(':'); + if (pos != -1) { sport = host.substring(pos + 1); host = host.substring(0, pos); }