This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new b6678986b4 Replace calls to methods that are deprecated in Java 16+
b6678986b4 is described below
commit b6678986b4fe7903019bea35a5d0b43a0ebaf07a
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Jan 12 19:57:09 2023 +0000
Replace calls to methods that are deprecated in Java 16+
---
test/org/apache/catalina/tribes/TesterMulticast.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java
b/test/org/apache/catalina/tribes/TesterMulticast.java
index 32227525c8..866d50ed30 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -19,6 +19,7 @@ package org.apache.catalina.tribes;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;
+import java.net.NetworkInterface;
import java.net.UnknownHostException;
/**
@@ -81,7 +82,8 @@ public class TesterMulticast {
public void run() {
try (MulticastSocket s = new MulticastSocket(PORT)) {
s.setLoopbackMode(false);
- s.joinGroup(INET_ADDRESS);
+ NetworkInterface networkInterface =
NetworkInterface.getByInetAddress(INET_ADDRESS);
+ s.setNetworkInterface(networkInterface);
DatagramPacket p = new DatagramPacket(new byte[4], 4);
p.setAddress(INET_ADDRESS);
p.setPort(PORT);
@@ -108,7 +110,8 @@ public class TesterMulticast {
public void run() {
try (MulticastSocket s = new MulticastSocket(PORT)) {
s.setLoopbackMode(false);
- s.joinGroup(INET_ADDRESS);
+ NetworkInterface networkInterface =
NetworkInterface.getByInetAddress(INET_ADDRESS);
+ s.setNetworkInterface(networkInterface);
DatagramPacket p = new DatagramPacket(new byte[4], 4);
p.setAddress(INET_ADDRESS);
p.setPort(PORT);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]