Simplify logic in SpringSampleWarPlugin.
This commit is contained in:
@@ -116,9 +116,6 @@ class SpringSampleWarPlugin extends SpringSamplePlugin {
|
||||
}
|
||||
|
||||
def static getRandomPort() {
|
||||
ServerSocket serverSocket = new ServerSocket(0)
|
||||
int port = serverSocket.localPort
|
||||
serverSocket.close()
|
||||
return port
|
||||
new ServerSocket(0).withCloseable { it.localPort }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user