mirror of https://github.com/apache/lucene.git
SOLR-13864: SolrTestCaseJ4.getNextAvailablePort() has been deprecated
(cherry picked from commit 603be023fe
)
This commit is contained in:
parent
26b7799af6
commit
b872863da9
|
@ -95,6 +95,9 @@ Other Changes
|
|||
|
||||
* SOLR-13824: Strictly reject anything after JSON in most APIs (Mikhail Khludnev, Munendra S N)
|
||||
|
||||
* SOLR-13864: SolrTestCaseJ4.getNextAvailablePort() has been deprecated (and will be removed in 9.0) since
|
||||
it is fundementally flawed. Users with tests that depend on this method should restructure them. (hossman)
|
||||
|
||||
================== 8.3.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||
|
|
|
@ -902,7 +902,10 @@ public abstract class SolrTestCaseJ4 extends SolrTestCase {
|
|||
* Find next available local port.
|
||||
* @return available port number or -1 if none could be found
|
||||
* @throws Exception on IO errors
|
||||
* @see <a href="https://issues.apache.org/jira/browse/SOLR-13869">SOLR-13869</a>
|
||||
* @deprecated This method is inherently flawed, see SOLR-13869
|
||||
*/
|
||||
@Deprecated
|
||||
protected static int getNextAvailablePort() throws Exception {
|
||||
int port = -1;
|
||||
try (ServerSocket s = new ServerSocket(0)) {
|
||||
|
|
Loading…
Reference in New Issue