Modernize for loop
This commit is contained in:
parent
26975a109a
commit
62630ae068
1 changed files with 5 additions and 4 deletions
|
@ -102,12 +102,13 @@ public class JettyServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openListeners() throws IOException {
|
private void openListeners() throws IOException {
|
||||||
// opening the listener here allows us to run on priviledged port 80 under jsvc
|
// opening the listener here allows us to run on privileged port 80 under jsvc
|
||||||
// even as non-root user, because init() is called with root privileges
|
// even as non-root user, because init() is called with root privileges
|
||||||
// while start() will be called with the user we will actually run as
|
// while start() will be called with the user we will actually run as
|
||||||
Connector[] connectors = http.getConnectors();
|
for (var connector : http.getConnectors()) {
|
||||||
for (int i = 0; i < connectors.length; i++) {
|
if (connector instanceof ServerConnector) {
|
||||||
((ServerConnector) connectors[i]).open();
|
((ServerConnector) connector).open();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue