GitHub user rdowner opened a pull request:
https://github.com/apache/incubator-brooklyn/pull/407
Find network port misc fixes
Correct a few things that looked a little suspicious while reviewing code
trying to find out why a Jenkins build had failed
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rdowner/incubator-brooklyn find-network-port
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-brooklyn/pull/407.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #407
----
commit 02c2bd8be8e3a94a449575bef2b8baeeaaf82f12
Author: Richard Downer <[email protected]>
Date: 2014-12-18T14:01:06Z
nextAvailablePort, give better error messages
Validate that the given argument is in the valid range for port numbers.
If not possible to find a port in the valid range, throw a descriptive
exception message (instead of trying an invalid port number and getting
an IllegalArgumentException from the JRE)
commit 25829fc5aa90c9fb762bd5477e6e978452ac4bb5
Author: Richard Downer <[email protected]>
Date: 2014-12-18T14:02:57Z
Fix illegal argument in isPortAvailable
JRE docs say that the wildcard address can only be used on bind()
operations, but there's a case where we might use it in a connect()
call - this is undefined behaviour. Correct the code to pass in the
loopback address to connect() instead of the wildcard address.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---