--- a/test/jdk/com/sun/jndi/ldap/lib/BaseLdapServer.java Wed May 01 15:10:09 2019 +0100
+++ b/test/jdk/com/sun/jndi/ldap/lib/BaseLdapServer.java Mon May 06 14:23:32 2019 +0800
@@ -161,8 +161,8 @@
*/
@Override
public synchronized void start() {
+ isRunning = true;
super.start();
- isRunning = true;
}
/**
--- a/test/jdk/com/sun/jndi/ldap/lib/LdapPlaybackServer.java Wed May 01 15:10:09 2019 +0100
+++ b/test/jdk/com/sun/jndi/ldap/lib/LdapPlaybackServer.java Mon May 06 14:23:32 2019 +0800
@@ -60,13 +60,16 @@
*/
private final Map<Integer, List<byte[]>> cache = new HashMap<>();
- private String fileName;
-
public LdapPlaybackServer(ServerSocket serverSocket, String fileName) {
super(serverSocket);
- this.fileName = fileName;
setDebugLevel(DebugLevel.CUSTOMIZE, this.getClass());
setCommonRequestHandler(this::handleRequest);
+ try {
+ debug("Loading LDAP cache from: " + fileName);
+ loadCaptureFile(fileName);
+ } catch (IOException e) {
+ throw new RuntimeException("ERROR: failed to load LDAP cache", e);
+ }
}
/*
@@ -167,10 +170,7 @@
@Override
public void run() {
try {
- debug("Loading LDAP cache from: " + fileName);
- loadCaptureFile(fileName);
debug("listening on port " + getPort());
-
super.run();
} catch (Exception e) {
debug("ERROR: " + e);