Checkstyle errors fix
This commit is contained in:
parent
1c4085ce51
commit
45bc4e1a1c
2 changed files with 5 additions and 5 deletions
|
|
@ -4,11 +4,11 @@ import java.io.IOException;
|
|||
import java.net.ServerSocket;
|
||||
|
||||
public class PortChecker {
|
||||
private int defaultPort = 8080;
|
||||
private int lastPort = 8090; // To limit the amount of ports to look for availability
|
||||
private static final int defaultPort = 8080;
|
||||
private static final int lastPort = 8090; // To limit the amount of ports to look for availability
|
||||
|
||||
/**
|
||||
* Finds a free port to launch the program on
|
||||
* Finds a free port to launch the program on.
|
||||
* made with the help of https://medium.com/@rrlinus5/find-available-port-in-your-system-java-f532ee48c5b3
|
||||
* @return the port that will be used to launch the program
|
||||
* @throws IOException when no available port is found
|
||||
|
|
@ -23,7 +23,7 @@ public class PortChecker {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks whether a port is actually available
|
||||
* Checks whether a port is actually available.
|
||||
* @param port the number of the port that's being checker
|
||||
* @return whether the port was available
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
|
|||
@Component
|
||||
public class ServerPortCustomizer implements WebServerFactoryCustomizer<ConfigurableWebServerFactory>{
|
||||
/**
|
||||
* Changes the port that will be used to launch the program
|
||||
* Changes the port that will be used to launch the program.
|
||||
* made with the help of: https://www.baeldung.com/spring-boot-change-port
|
||||
* @param factory
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue