[jboss-jira] [JBoss JIRA] (WFCORE-3296) Ephemeral port number (port="0") should not be affected by port offset
Radoslav Husar (JIRA)
issues at jboss.org
Fri Sep 15 06:55:00 EDT 2017
Radoslav Husar created WFCORE-3296:
--------------------------------------
Summary: Ephemeral port number (port="0") should not be affected by port offset
Key: WFCORE-3296
URL: https://issues.jboss.org/browse/WFCORE-3296
Project: WildFly Core
Issue Type: Bug
Affects Versions: 3.0.2.Final
Reporter: Radoslav Husar
Port 0 is almost universally considered an indeterminate port/ephemeral/port chosen by the OS and obviously applying an offset to such port (e.g. offset of -100) will fail on multiple fronts, e.g.:
{noformat}
Caused by: java.lang.IllegalArgumentException: port out of range:-100
{noformat}
This is a regression introduced in https://issues.jboss.org/browse/WFLY-2345 based on discussion on https://developer.jboss.org/message/842406#842407 in PR https://github.com/wildfly/wildfly/pull/5307/files#diff-1a9ef995f085779b0598a1322551e580L114
The original condition was also not really correct, since we allow negative and positive port offsets, the correct condition really is {{if (!isFixedPort && port != 0) {...}}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list