Skip to content

Commit

Permalink
Fix javadoc in Ports (#413)
Browse files Browse the repository at this point in the history
* Change javadoc to say there must be exactly one application/admin
  port in the "findOnly" methods
  • Loading branch information
sleberknight authored Apr 27, 2024
1 parent 6cd1bd0 commit 71fb6be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/kiwiproject/registry/util/Ports.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
public class Ports {

/**
* Find the single application port. If there are none or more than one, throw an exception.
* Find the single application port. If there is not exactly one, throw an exception.
*
* @param ports the ports to filter
* @return the application port
* @throws IllegalStateException if there are none or there is more than one port
* @throws IllegalStateException if there is not exactly one port
*/
public static Port findOnlyApplicationPort(List<Port> ports) {
var applicationPorts = findApplicationPorts(ports);
Expand All @@ -42,11 +42,11 @@ public static List<Port> findApplicationPorts(List<Port> ports) {
}

/**
* Find the single admin port. If there are none or more than one, throw an exception.
* Find the single admin port. If there is not exactly one, throw an exception.
*
* @param ports the ports to filter
* @return the admin port
* @throws IllegalStateException if there are none or there is more than one port
* @throws IllegalStateException if there is not exactly one port
*/
public static Port findOnlyAdminPort(List<Port> ports) {
var adminPorts = findAdminPorts(ports);
Expand Down

0 comments on commit 71fb6be

Please sign in to comment.