Skip to content

Commit

Permalink
Remove deprecated SocketUtils
Browse files Browse the repository at this point in the history
Closes gh-28052
  • Loading branch information
sbrannen committed Feb 15, 2022
1 parent bbd35de commit 2cee634
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 564 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.junit.jupiter.api.Test;

import org.springframework.aop.framework.ProxyFactory;
import org.springframework.core.testfixture.net.TestSocketUtils;
import org.springframework.jmx.AbstractMBeanServerTests;
import org.springframework.jmx.IJmxTestBean;
import org.springframework.jmx.JmxTestBean;
Expand Down Expand Up @@ -177,7 +178,7 @@ void lazyConnectionToRemote() throws Exception {
assumeTrue(runTests);

@SuppressWarnings("deprecation")
final int port = org.springframework.util.SocketUtils.findAvailableTcpPort();
final int port = TestSocketUtils.findAvailableTcpPort();

JMXServiceURL url = new JMXServiceURL("service:jmx:jmxmp://localhost:" + port);
JMXConnectorServer connector = JMXConnectorServerFactory.newJMXConnectorServer(url, null, getServer());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

import org.junit.jupiter.api.AfterEach;

import org.springframework.core.testfixture.net.TestSocketUtils;

/**
* @author Rob Harrop
* @author Chris Beams
Expand All @@ -36,7 +38,7 @@
class RemoteMBeanClientInterceptorTests extends MBeanClientInterceptorTests {

@SuppressWarnings("deprecation")
private final int servicePort = org.springframework.util.SocketUtils.findAvailableTcpPort();
private final int servicePort = TestSocketUtils.findAvailableTcpPort();

private final String serviceUrl = "service:jmx:jmxmp://localhost:" + servicePort;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import org.junit.jupiter.api.Test;

import org.springframework.core.testfixture.net.TestSocketUtils;
import org.springframework.jmx.AbstractMBeanServerTests;

import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -47,7 +48,7 @@ class ConnectorServerFactoryBeanTests extends AbstractMBeanServerTests {
private static final String OBJECT_NAME = "spring:type=connector,name=test";

@SuppressWarnings("deprecation")
private final String serviceUrl = "service:jmx:jmxmp://localhost:" + org.springframework.util.SocketUtils.findAvailableTcpPort();
private final String serviceUrl = "service:jmx:jmxmp://localhost:" + TestSocketUtils.findAvailableTcpPort();


@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.junit.jupiter.api.Test;

import org.springframework.aop.support.AopUtils;
import org.springframework.core.testfixture.net.TestSocketUtils;
import org.springframework.jmx.AbstractMBeanServerTests;

import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -39,7 +40,7 @@
class MBeanServerConnectionFactoryBeanTests extends AbstractMBeanServerTests {

@SuppressWarnings("deprecation")
private final String serviceUrl = "service:jmx:jmxmp://localhost:" + org.springframework.util.SocketUtils.findAvailableTcpPort();
private final String serviceUrl = "service:jmx:jmxmp://localhost:" + TestSocketUtils.findAvailableTcpPort();


@Test
Expand Down
319 changes: 0 additions & 319 deletions spring-core/src/main/java/org/springframework/util/SocketUtils.java

This file was deleted.

0 comments on commit 2cee634

Please sign in to comment.