From 8d56e22e1546584ff02db85762304504af16039d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 15 Mar 2018 20:48:02 +0100 Subject: [PATCH] TD3: Remove deprecation warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- TD3/exemples/javarmi/hello/HelloClient.java | 3 +-- TD3/exemples/javarmi/hello/HelloServer.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/TD3/exemples/javarmi/hello/HelloClient.java b/TD3/exemples/javarmi/hello/HelloClient.java index 0d0eeea..482a5e8 100644 --- a/TD3/exemples/javarmi/hello/HelloClient.java +++ b/TD3/exemples/javarmi/hello/HelloClient.java @@ -1,11 +1,10 @@ package exemples.javarmi.hello; import java.rmi.Naming; -import java.rmi.RMISecurityManager; public class HelloClient { public static void main(String[] args){ /* lance le SecurityManager */ - System.setSecurityManager(new RMISecurityManager()); + System.setSecurityManager(new SecurityManager()); try { String server = args[0]; int port = Integer.parseInt(args[1]); diff --git a/TD3/exemples/javarmi/hello/HelloServer.java b/TD3/exemples/javarmi/hello/HelloServer.java index ad08111..2c0c345 100644 --- a/TD3/exemples/javarmi/hello/HelloServer.java +++ b/TD3/exemples/javarmi/hello/HelloServer.java @@ -1,11 +1,10 @@ package exemples.javarmi.hello; import java.rmi.Naming; -import java.rmi.RMISecurityManager; public class HelloServer { public static void main (String[] args) { /* lancer SecurityManager */ - System.setSecurityManager(new RMISecurityManager()); + System.setSecurityManager(new SecurityManager()); try { /* créer une instance de la classe Hello et l'enregistrer dans le serveur de noms */ Naming.rebind("Hello1", new HelloImpl("Hello world")); -- 2.34.1