Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan E. Cook2016-09-30 17:36:26 +0000
committerdonald.g.dunne2016-09-30 17:36:26 +0000
commitb7673d93437ab004d023170f1f4bc14df2dcca86 (patch)
tree7eab97b84e9426b440d829a8d080b05caa10dc52 /plugins
parent1ba9c899d64be3a041d29dc38e71553afe827d34 (diff)
downloadorg.eclipse.osee-b7673d93437ab004d023170f1f4bc14df2dcca86.tar.gz
org.eclipse.osee-b7673d93437ab004d023170f1f4bc14df2dcca86.tar.xz
org.eclipse.osee-b7673d93437ab004d023170f1f4bc14df2dcca86.zip
bug: Fix potential null pointer errors
Change-Id: I9674834488c5172954f4ed584ff32708100657b6 Signed-off-by: Morgan E. Cook <Morgan.e.cook@boeing.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionCreateCommand.java2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionReconnectCommand.java4
3 files changed, 7 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java
index a4c1f28dab4..4c941ab3a34 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java
@@ -377,8 +377,10 @@ public final class AtsNavigateViewItems implements XNavigateViewItems, IXNavigat
try {
Object obj = bundle.loadClass(classname).newInstance();
IAtsNavigateItem task = (IAtsNavigateItem) obj;
- for (XNavigateItem navItem : task.getNavigateItems(parentItem)) {
- nameToNavItem.put(navItem.getName(), navItem);
+ if (task != null) {
+ for (XNavigateItem navItem : task.getNavigateItems(parentItem)) {
+ nameToNavItem.put(navItem.getName(), navItem);
+ }
}
} catch (Exception ex) {
OseeLog.log(Activator.class, Level.SEVERE, "Error loading AtsNavigateItem extension", ex);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionCreateCommand.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionCreateCommand.java
index 5091086abf0..74c0e288ee5 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionCreateCommand.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionCreateCommand.java
@@ -74,7 +74,7 @@ public class ConnectionCreateCommand extends Command {
// return false, if the source -> target connection exists already
for (Iterator<?> iter = source.getSourceConnections().iterator(); iter.hasNext();) {
Connection conn = (Connection) iter.next();
- if (conn.getTarget().equals(target)) {
+ if (conn != null && conn.getTarget().equals(target)) {
return false;
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionReconnectCommand.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionReconnectCommand.java
index 55ecaa79f1d..b11fa8ba911 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionReconnectCommand.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/commands/ConnectionReconnectCommand.java
@@ -89,7 +89,7 @@ public class ConnectionReconnectCommand extends Command {
Connection conn = (Connection) iter.next();
// return false if a newSource -> oldTarget connection exists already
// and it is a different instance than the connection-field
- if (conn.getTarget().equals(oldTarget) && !conn.equals(connection)) {
+ if (conn != null && conn.getTarget().equals(oldTarget) && !conn.equals(connection)) {
return false;
}
}
@@ -109,7 +109,7 @@ public class ConnectionReconnectCommand extends Command {
Connection conn = (Connection) iter.next();
// return false if a oldSource -> newTarget connection exists already
// and it is a differenct instance that the connection-field
- if (conn.getSource().equals(oldSource) && !conn.equals(connection)) {
+ if (conn != null && conn.getSource().equals(oldSource) && !conn.equals(connection)) {
return false;
}
}

Back to the top