Skip to content

Commit 399efde

Browse files
committed
去掉多余的Exception
1 parent 3f0bd80 commit 399efde

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cn/aofeng/demo/java/rmi/RmiServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package cn.aofeng.demo.java.rmi;
22

3-
import java.net.MalformedURLException;
43
import java.rmi.AlreadyBoundException;
54
import java.rmi.RemoteException;
65
import java.rmi.registry.LocateRegistry;
@@ -31,8 +30,9 @@ public static Registry createRegistry(int port) {
3130

3231
/**
3332
* @param args [0]:绑定端口
33+
* @throws RemoteException
3434
*/
35-
public static void main(String[] args) throws RemoteException, MalformedURLException, AlreadyBoundException {
35+
public static void main(String[] args) throws RemoteException {
3636
int port = Integer.parseInt(args[0]);
3737
UserService userService = new UserServiceImpl();
3838
Registry registry = createRegistry(port);

0 commit comments

Comments
 (0)