minor - fixed an occasional NPE discover during field testing
This commit is contained in:
parent
63eb54bc4e
commit
eebe80ec8f
|
@ -100,11 +100,14 @@ public class DashboardRunnable implements Runnable, Serializable
|
||||||
if (serverContext == null) {
|
if (serverContext == null) {
|
||||||
serverContext = ServerContext.newInstance();
|
serverContext = ServerContext.newInstance();
|
||||||
serverContext.putAll(ctx);
|
serverContext.putAll(ctx);
|
||||||
} else if (!ctx.getProperty(SessionContextListener.SERVLET_SESSION_ID).equals(serverContext.getProperty(SessionContextListener.SERVLET_SESSION_ID))) {
|
} else {
|
||||||
|
String id = ctx.getProperty(SessionContextListener.SERVLET_SESSION_ID);
|
||||||
|
if (id == null || !id.equals(serverContext.getProperty(SessionContextListener.SERVLET_SESSION_ID))) {
|
||||||
serverContext.clear();
|
serverContext.clear();
|
||||||
serverContext.putAll(ctx);
|
serverContext.putAll(ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
dashboardPanels.get(i).refresh(template);
|
dashboardPanels.get(i).refresh(template);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,11 +119,14 @@ public class DashboardRunnable implements Runnable, Serializable
|
||||||
if (serverContext == null) {
|
if (serverContext == null) {
|
||||||
serverContext = ServerContext.newInstance();
|
serverContext = ServerContext.newInstance();
|
||||||
serverContext.putAll(ctx);
|
serverContext.putAll(ctx);
|
||||||
} else if (!ctx.getProperty(SessionContextListener.SERVLET_SESSION_ID).equals(serverContext.getProperty(SessionContextListener.SERVLET_SESSION_ID))) {
|
} else {
|
||||||
|
String id = ctx.getProperty(SessionContextListener.SERVLET_SESSION_ID);
|
||||||
|
if (id == null || !id.equals(serverContext.getProperty(SessionContextListener.SERVLET_SESSION_ID))) {
|
||||||
serverContext.clear();
|
serverContext.clear();
|
||||||
serverContext.putAll(ctx);
|
serverContext.putAll(ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
appDesktop.onServerPush(template);
|
appDesktop.onServerPush(template);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue