fix: RMI重构修复,已经可用

This commit is contained in:
qi4l
2026-03-28 11:39:33 +08:00
parent effae00500
commit e4097e79aa
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -132,7 +132,6 @@ public class RMIServer implements Runnable {
doMessage(s, in, out); doMessage(s, in, out);
break; break;
default: default:
case TransportConstants.MultiplexProtocol:
System.err.println("Unsupported protocol"); System.err.println("Unsupported protocol");
s.close(); s.close();
continue; continue;
@@ -148,9 +147,7 @@ public class RMIServer implements Runnable {
e.printStackTrace(System.err); e.printStackTrace(System.err);
} finally { } finally {
System.out.println(Ansi.ansi().fgRgb(255, 165, 0).a(" Closing connection").reset()); System.out.println(Ansi.ansi().fgRgb(255, 165, 0).a(" Closing connection").reset());
if (s != null) { s.close();
s.close();
}
} }
} }
} finally { } finally {
@@ -50,7 +50,7 @@ public class Basic {
return new Reference("Foo", className, Config.codeBase); return new Reference("Foo", className, Config.codeBase);
} }
private static void parse(String base) throws Exception { private static void parse(String base) {
System.out.println("- JNDI RMI Remote Reference Links "); System.out.println("- JNDI RMI Remote Reference Links ");
try { try {
String normalized = base.replace('\\', '/'); String normalized = base.replace('\\', '/');