Omaha #4238 null safety check if feed view temporarily exists in other perspectives

after logging out

Change-Id: I9bdfa86a1ae2d587cf3ad4487d0c6eae15f1ff25

Former-commit-id: 808ae0398b [formerly e078881789 [formerly b915adf57c64e5b0cf5f856436c9a1f01098a897]]
Former-commit-id: e078881789
Former-commit-id: 7e899a1c08
This commit is contained in:
Nate Jensen 2015-03-10 18:38:41 -05:00
parent 1e8abe2bd0
commit a47e9b72ac

View file

@ -72,6 +72,7 @@ import com.raytheon.viz.ui.views.CaveWorkbenchPageManager;
* to display messages.
* Jun 16, 2014 3288 bclement feed venue configuration changes
* Oct 08, 2014 3705 bclement moved venue joining code to CollaborationConnection
* Mar 10, 2015 4238 njensen null check in getSessionId()
*
* </pre>
*
@ -109,12 +110,15 @@ public class DisplayFeedAction extends Action {
CollaborationConnection connection = CollaborationConnection
.getConnection();
String sessionId = null;
for (ISession session : connection.getSessions()) {
if (session instanceof IVenueSession) {
FeedVenueConfig config = FeedVenueConfigManager.getConfig();
if (((IVenueSession) session).getVenueName().equalsIgnoreCase(
config.getName())) {
sessionId = session.getSessionId();
// connection can be null in rare cases
if (connection != null) {
for (ISession session : connection.getSessions()) {
if (session instanceof IVenueSession) {
FeedVenueConfig config = FeedVenueConfigManager.getConfig();
if (((IVenueSession) session).getVenueName()
.equalsIgnoreCase(config.getName())) {
sessionId = session.getSessionId();
}
}
}
}