Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan E. Cook2016-05-17 16:31:53 -0400
committerAngel Avila2016-05-17 16:31:53 -0400
commit0b2bec8b82ddf12b6cf51b15ade332fc85df6543 (patch)
tree2d95d9acf4d91b0f8fdbed82c618b6e42af3e7ae
parent692d03cd692ee24251a043017520b9ff870846fe (diff)
downloadorg.eclipse.osee-0b2bec8b82ddf12b6cf51b15ade332fc85df6543.tar.gz
org.eclipse.osee-0b2bec8b82ddf12b6cf51b15ade332fc85df6543.tar.xz
org.eclipse.osee-0b2bec8b82ddf12b6cf51b15ade332fc85df6543.zip
refactor[ats_ATS284247]: Remove unnecessary null checks
Signed-off-by: Morgan E. Cook <Morgan.e.cook@boeing.com> Change-Id: I5a960e44966d3b3ae4baad4adb8b97d6592ae566
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java4
-rw-r--r--plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServer.java6
-rw-r--r--plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServer.java18
-rw-r--r--plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TestPointRecord.java301
-rw-r--r--plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessageHeader.java45
-rw-r--r--plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/DomainParticipant.java12
6 files changed, 169 insertions, 217 deletions
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
index 1f3b7a0fa7..b5359e7a2d 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java
@@ -268,7 +268,7 @@ public class AccessControlService implements IAccessControlService {
Integer groupMember = stmt.getInt("b_art_id");
subjectToGroupCache.put(groupMember, groupId);
groupToSubjectsCache.put(groupId, groupMember);
- } , USER_GROUP_MEMBERS, groupId, CoreRelationTypes.Users_User.getGuid());
+ }, USER_GROUP_MEMBERS, groupId, CoreRelationTypes.Users_User.getGuid());
}
}
@@ -422,7 +422,7 @@ public class AccessControlService implements IAccessControlService {
if (accessObject == null) {
userPermission = PermissionEnum.FULLACCESS;
- } else if (userPermission == null) {
+ } else {
userPermission = acquirePermissionRank(subject, accessObject);
}
return userPermission;
diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServer.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServer.java
index 9b5c9d5cf7..721bc994dc 100644
--- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServer.java
+++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServer.java
@@ -255,7 +255,7 @@ public class ClassServer extends Thread {
out.flush();
return;
}
- String[] args = null;
+
boolean get = req.startsWith("GET ");
if (!get && !req.startsWith("HEAD ")) {
OseeLog.log(PluginCoreActivator.class, Level.FINE, "bad request \"{0}\" from {1}:{2}");
@@ -275,9 +275,7 @@ public class ClassServer extends Thread {
out.flush();
return;
}
- if (args != null) {
- args[0] = path;
- }
+
OseeLog.log(PluginCoreActivator.class, Level.FINER,
get ? "{0} requested from {1}:{2}" : "{0} probed from {1}:{2}");
byte[] bytes;
diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServer.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServer.java
index 10d605f916..f0c074fc61 100644
--- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServer.java
+++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServer.java
@@ -26,7 +26,6 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.logging.Level;
-
import org.eclipse.osee.framework.logging.OseeLog;
public class ClassServer extends Thread {
@@ -53,11 +52,11 @@ public class ClassServer extends Thread {
return th;
}
});
- if(address instanceof Inet6Address){
- hostName = new URL("http://[" + address.getHostAddress() + "]:" + server.getLocalPort() + "/");
- } else {
+ if (address instanceof Inet6Address) {
+ hostName = new URL("http://[" + address.getHostAddress() + "]:" + server.getLocalPort() + "/");
+ } else {
hostName = new URL("http://" + address.getHostAddress() + ":" + server.getLocalPort() + "/");
- }
+ }
this.setName("OSEE ClassServer");
this.resourceFinders = new ArrayList<>();
}
@@ -255,7 +254,7 @@ public class ClassServer extends Thread {
out.flush();
return;
}
- String[] args = null;
+
boolean get = req.startsWith("GET ");
if (!get && !req.startsWith("HEAD ")) {
OseeLog.log(ClassServer.class, Level.FINE, "bad request \"{0}\" from {1}:{2}");
@@ -275,11 +274,8 @@ public class ClassServer extends Thread {
out.flush();
return;
}
- if (args != null) {
- args[0] = path;
- }
- OseeLog.log(ClassServer.class, Level.FINER,
- get ? "{0} requested from {1}:{2}" : "{0} probed from {1}:{2}");
+
+ OseeLog.log(ClassServer.class, Level.FINER, get ? "{0} requested from {1}:{2}" : "{0} probed from {1}:{2}");
byte[] bytes;
try {
bytes = getBytes(path);
diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TestPointRecord.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TestPointRecord.java
index c9d659d904..31406c565e 100644
--- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TestPointRecord.java
+++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TestPointRecord.java
@@ -11,10 +11,8 @@
package org.eclipse.osee.ote.core.log.record;
import java.util.logging.Level;
-
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
-
import org.codehaus.jackson.annotate.JsonProperty;
import org.eclipse.osee.framework.jdk.core.util.xml.Jaxp;
import org.eclipse.osee.framework.jdk.core.util.xml.XMLStreamWriterUtil;
@@ -37,178 +35,147 @@ import org.w3c.dom.Element;
*/
public class TestPointRecord extends TestRecord {
private static final long serialVersionUID = 921875066237859323L;
- private int number;
- protected ITestPoint testPoint;
+ private int number;
+ protected ITestPoint testPoint;
+
+ public TestPointRecord(ITestEnvironmentAccessor source, ITestPoint testPoint, boolean timeStamp) {
+ this(source, source.getTestScript(), source.getTestScript().getTestCase(), testPoint, timeStamp);
+ }
+
+ /**
+ * TestPointRecord Constructor. Sets up a test point record of the result of the test point.
+ *
+ * @param source The object requesting the logging.
+ * @param accessor The test case the test point is in.
+ * @param testPoint The TestSubPoint object for the test point.
+ * @param timeStamp <b>True </b> if a timestamp should be recorded, <b>False </b> if not.
+ */
+ public TestPointRecord(ITestEnvironmentAccessor source, TestScript script, TestCase accessor, ITestPoint testPoint, boolean timeStamp) {
+ super(source, TestLevel.TEST_POINT, "", timeStamp);
+ this.testPoint = testPoint;
+ script.__addTestPoint(testPoint.isPass());
+ // this.testCase = accessor.getTestCase();
+ if (accessor == null) {
+ // OseeLog.log(Activator.class, Level.INFO, "test case null");
+ } else if (accessor.getTestScript() == null) {
+ OseeLog.log(TestEnvironment.class, Level.INFO, "test script null");
+ }
+
+ this.number = script.__recordTestPoint(testPoint.isPass());
+ }
- public TestPointRecord(ITestEnvironmentAccessor source, ITestPoint testPoint, boolean timeStamp) {
- this(source, source.getTestScript(), source.getTestScript().getTestCase(), testPoint, timeStamp);
- }
+ /**
+ * TestPointRecord Constructor. Sets up a test point record of the result of the test point
+ *
+ * @param source The object requesting the logging.
+ * @param testPoint The TestPoint object for the test point.
+ */
+ public TestPointRecord(ITestEnvironmentAccessor source, TestScript script, TestCase testCase, ITestPoint testPoint) {
+ this(source, script, testCase, testPoint, true);
+ int point = script.getCurrentPointNumber();
- /**
- * TestPointRecord Constructor. Sets up a test point record of the result of
- * the test point.
- *
- * @param source
- * The object requesting the logging.
- * @param accessor
- * The test case the test point is in.
- * @param testPoint
- * The TestSubPoint object for the test point.
- * @param timeStamp
- * <b>True </b> if a timestamp should be recorded, <b>False </b>
- * if not.
- */
- public TestPointRecord(ITestEnvironmentAccessor source, TestScript script, TestCase accessor, ITestPoint testPoint, boolean timeStamp) {
- super(source, TestLevel.TEST_POINT, "", timeStamp);
- this.testPoint = testPoint;
- script.__addTestPoint(testPoint.isPass());
- // this.testCase = accessor.getTestCase();
- if (accessor == null) {
- // OseeLog.log(Activator.class, Level.INFO, "test case null");
- } else if (accessor.getTestScript() == null) {
- OseeLog.log(TestEnvironment.class, Level.INFO, "test script null");
- }
- if (testPoint == null) {
- OseeLog.log(TestEnvironment.class, Level.INFO, "test point null");
- }
- this.number = script.__recordTestPoint(testPoint.isPass());
- }
+ if (!testPoint.isPass()) {
+ try {
+ if (testPoint instanceof CheckPoint) {
+ CheckPoint cp = (CheckPoint) testPoint;
+ String exp = cp.getExpected();
+ String act = cp.getActual();
+ String name = cp.getTestPointName();
+ Throwable th = new Throwable();
+ StringBuilder stack = new StringBuilder();
+ boolean printLine = false;
+ for (StackTraceElement element : th.getStackTrace()) {
+ if (!printLine && !element.toString().startsWith("org.eclipse.osee")) {
+ printLine = true;
+ }
+ if (printLine) {
+ stack.append(element.toString());
+ stack.append("\n");
+ }
+ }
+ script.pauseScriptOnFail(point, name, exp, act, stack.toString());
+ script.printFailure(point, name, exp, act, stack.toString());
+ } else {
+ script.pauseScriptOnFail(point);
+ script.printFailure(point);
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
- /**
- * TestPointRecord Constructor. Sets up a test point record of the result of
- * the test point
- *
- * @param source
- * The object requesting the logging.
- * @param testPoint
- * The TestPoint object for the test point.
- */
- public TestPointRecord(ITestEnvironmentAccessor source, TestScript script, TestCase testCase, ITestPoint testPoint) {
- this(source, script, testCase, testPoint, true);
- int point = script.getCurrentPointNumber();
-
- if (!testPoint.isPass()) {
- try {
- if (testPoint instanceof CheckPoint) {
- CheckPoint cp = (CheckPoint) testPoint;
- String exp = cp.getExpected();
- String act = cp.getActual();
- String name = cp.getTestPointName();
- Throwable th = new Throwable();
- StringBuilder stack = new StringBuilder();
- boolean printLine = false;
- for (StackTraceElement element : th.getStackTrace()) {
- if (!printLine && !element.toString().startsWith("org.eclipse.osee")) {
- printLine = true;
- }
- if (printLine){
- stack.append(element.toString());
- stack.append("\n");
- }
- }
- script.pauseScriptOnFail(point, name, exp, act, stack.toString());
- script.printFailure(point, name, exp, act, stack.toString());
- }
- else {
- script.pauseScriptOnFail(point);
- script.printFailure(point);
- }
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
+ /**
+ * TestPointRecord Constructor. Sets up a test point record of the result of the test point.
+ *
+ * @param source The object requesting the logging.
+ * @param script The test script object
+ * @param testCase The test case object
+ * @param testPointName The name of the item being tested.
+ * @param expected The expected value for the test point.
+ * @param actual The actual value for the test point.
+ * @param passed <b>True </b> if the test point passed, <b>False </b> if not.
+ * @param timeStamp <b>True </b> if a timestamp should be recorded, <b>False </b> if not.
+ */
+ public TestPointRecord(ITestEnvironmentAccessor source, TestScript script, TestCase testCase, String testPointName, String expected, String actual, boolean passed, boolean timeStamp) {
+ this(source, script, testCase, new CheckPoint(testPointName, expected, actual, passed), timeStamp);
+ }
- /**
- * TestPointRecord Constructor. Sets up a test point record of the result of
- * the test point.
- *
- * @param source
- * The object requesting the logging.
- * @param script
- * The test script object
- * @param testCase
- * The test case object
- * @param testPointName
- * The name of the item being tested.
- * @param expected
- * The expected value for the test point.
- * @param actual
- * The actual value for the test point.
- * @param passed
- * <b>True </b> if the test point passed, <b>False </b> if not.
- * @param timeStamp
- * <b>True </b> if a timestamp should be recorded, <b>False </b>
- * if not.
- */
- public TestPointRecord(ITestEnvironmentAccessor source, TestScript script, TestCase testCase, String testPointName, String expected, String actual,
- boolean passed, boolean timeStamp) {
- this(source, script, testCase, new CheckPoint(testPointName, expected, actual, passed), timeStamp);
- }
+ /**
+ * TestPointRecord Constructor. Sets up a test point record of the result of the test point.
+ *
+ * @param source The object requesting the logging.
+ * @param accessor The test case the test point is in.
+ * @param testPointName The name of the item being tested.
+ * @param expected The expected value for the test point.
+ * @param actual The actual value for the test point.
+ * @param passed <b>True </b> if the test point passed, <b>False </b> if not.
+ */
+ public TestPointRecord(ITestEnvironmentAccessor source, TestScript script, TestCase accessor, String testPointName, String expected, String actual, boolean passed) {
+ this(source, script, accessor, testPointName, expected, actual, passed, true);
+ }
- /**
- * TestPointRecord Constructor. Sets up a test point record of the result of
- * the test point.
- *
- * @param source
- * The object requesting the logging.
- * @param accessor
- * The test case the test point is in.
- * @param testPointName
- * The name of the item being tested.
- * @param expected
- * The expected value for the test point.
- * @param actual
- * The actual value for the test point.
- * @param passed
- * <b>True </b> if the test point passed, <b>False </b> if not.
- */
- public TestPointRecord(ITestEnvironmentAccessor source, TestScript script, TestCase accessor, String testPointName, String expected, String actual,
- boolean passed) {
- this(source, script, accessor, testPointName, expected, actual, passed, true);
- }
+ /**
+ * Converts element to XML formating.
+ *
+ * @return Element XML formated element.
+ */
+ @Override
+ public Element toXml(Document doc) {
+ Element tpElement = doc.createElement("TestPoint");
+ tpElement.appendChild(Jaxp.createElement(doc, "Number", String.valueOf(number)));
+ if (testPoint.isPass()) {
+ tpElement.appendChild(Jaxp.createElement(doc, "Result", "PASSED"));
+ } else {
+ tpElement.appendChild(Jaxp.createElement(doc, "Result", "FAILED"));
+ }
+ tpElement.appendChild(this.getLocation(doc));
+ tpElement.appendChild(testPoint.toXml(doc));
- /**
- * Converts element to XML formating.
- *
- * @return Element XML formated element.
- */
- @Override
- public Element toXml(Document doc) {
- Element tpElement = doc.createElement("TestPoint");
- tpElement.appendChild(Jaxp.createElement(doc, "Number", String.valueOf(number)));
- if (testPoint.isPass()) {
- tpElement.appendChild(Jaxp.createElement(doc, "Result", "PASSED"));
- } else {
- tpElement.appendChild(Jaxp.createElement(doc, "Result", "FAILED"));
- }
- tpElement.appendChild(this.getLocation(doc));
- tpElement.appendChild(testPoint.toXml(doc));
+ return tpElement;
+ }
- return tpElement;
- }
+ @Override
+ public void toXml(XMLStreamWriter writer) throws XMLStreamException {
+ writer.writeStartElement("TestPoint");
+ XMLStreamWriterUtil.writeElement(writer, "Number", String.valueOf(number));
+ if (testPoint.isPass()) {
+ XMLStreamWriterUtil.writeElement(writer, "Result", "PASSED");
+ } else {
+ XMLStreamWriterUtil.writeElement(writer, "Result", "FAILED");
+ }
+ writeLocation(writer);
+ testPoint.toXml(writer);
+ writer.writeEndElement();
+ }
- @Override
- public void toXml(XMLStreamWriter writer) throws XMLStreamException {
- writer.writeStartElement("TestPoint");
- XMLStreamWriterUtil.writeElement(writer, "Number", String.valueOf(number));
- if (testPoint.isPass()) {
- XMLStreamWriterUtil.writeElement(writer, "Result", "PASSED");
- } else {
- XMLStreamWriterUtil.writeElement(writer, "Result", "FAILED");
- }
- writeLocation(writer);
- testPoint.toXml(writer);
- writer.writeEndElement();
- }
+ @JsonProperty
+ public ITestPoint getTestPoint() {
+ return testPoint;
+ }
- @JsonProperty
- public ITestPoint getTestPoint() {
- return testPoint;
- }
-
- @JsonProperty
- public int getNumber() {
- return number;
- }
+ @JsonProperty
+ public int getNumber() {
+ return number;
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessageHeader.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessageHeader.java
index cdfc4480ee..c0b16de506 100644
--- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessageHeader.java
+++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessageHeader.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.ote.message.event;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;
-
import org.eclipse.osee.ote.message.IMessageHeader;
import org.eclipse.osee.ote.message.data.HeaderData;
import org.eclipse.osee.ote.message.data.MemoryResource;
@@ -21,9 +20,9 @@ import org.eclipse.osee.ote.message.elements.IntegerElement;
import org.eclipse.osee.ote.message.elements.LongIntegerElement;
import org.eclipse.osee.ote.message.elements.StringElement;
-public class OteEventMessageHeader implements IMessageHeader{
+public class OteEventMessageHeader implements IMessageHeader {
- public static final int HEADER_SIZE = 164+53;
+ public static final int HEADER_SIZE = 164 + 53;
public static final int MARKER_VALUE = 0xFADE;
private final HeaderData headerData;
private final Object[] paths;
@@ -37,24 +36,24 @@ public class OteEventMessageHeader implements IMessageHeader{
public final IntegerElement TTL;
public final StringElement RESPONSE_TOPIC;
public final IntegerElement RESPONSE_ID;
- public final SOCKET_ADDRESS_RECORD ADDRESS;
-
+ public final SOCKET_ADDRESS_RECORD ADDRESS;
+
private final String name;
public OteEventMessageHeader(OteEventMessage msg, String topic, int messageId, MemoryResource data) {
- this.name = msg.getName();
- headerData = new HeaderData("OteEventMessageHeader", data);
- paths = new Object[]{(msg == null ? "message" : msg.getClass().getName()), "HEADER(OteEventMessageHeader)"};
+ this.name = msg.getName();
+ headerData = new HeaderData("OteEventMessageHeader", data);
+ paths = new Object[] {(msg.getClass().getName()), "HEADER(OteEventMessageHeader)"};
MARKER = new IntegerElement(msg, "MARKER", headerData, 0, 0, 15);
- TOPIC = new StringElement(msg, "TOPIC", headerData, 2, 0, 8*96);
- MESSAGE_ID = new IntegerElement(msg, "MESSAGE_ID", headerData, 66+32, 0, 31);
- MESSAGE_SEQUENCE_NUMBER = new IntegerElement(msg, "MESSAGE_ID", headerData, 66+32, 0, 31);
- UUID_LOW = new LongIntegerElement(msg, "UUID_LOW", headerData, 74+32, 0, 63);
- UUID_HIGH = new LongIntegerElement(msg, "UUID_HIGH", headerData, 82+32, 0, 63);
- TTL = new IntegerElement(msg, "TTL", headerData, 90+32, 0, 31);
- RESPONSE_TOPIC = new StringElement(msg, "TOPIC", headerData, 94+32, 0, 8*64);
- RESPONSE_ID = new IntegerElement(msg, "RESPONSE_ID", headerData, 158+32, 0, 31);
- ADDRESS = new SOCKET_ADDRESS_RECORD(msg, "ADDRESS", headerData, 164+32, 0, SOCKET_ADDRESS_RECORD.SIZE*8-1);
+ TOPIC = new StringElement(msg, "TOPIC", headerData, 2, 0, 8 * 96);
+ MESSAGE_ID = new IntegerElement(msg, "MESSAGE_ID", headerData, 66 + 32, 0, 31);
+ MESSAGE_SEQUENCE_NUMBER = new IntegerElement(msg, "MESSAGE_ID", headerData, 66 + 32, 0, 31);
+ UUID_LOW = new LongIntegerElement(msg, "UUID_LOW", headerData, 74 + 32, 0, 63);
+ UUID_HIGH = new LongIntegerElement(msg, "UUID_HIGH", headerData, 82 + 32, 0, 63);
+ TTL = new IntegerElement(msg, "TTL", headerData, 90 + 32, 0, 31);
+ RESPONSE_TOPIC = new StringElement(msg, "TOPIC", headerData, 94 + 32, 0, 8 * 64);
+ RESPONSE_ID = new IntegerElement(msg, "RESPONSE_ID", headerData, 158 + 32, 0, 31);
+ ADDRESS = new SOCKET_ADDRESS_RECORD(msg, "ADDRESS", headerData, 164 + 32, 0, SOCKET_ADDRESS_RECORD.SIZE * 8 - 1);
TOPIC.setValue(topic);
MARKER.setValue(MARKER_VALUE);
@@ -63,7 +62,7 @@ public class OteEventMessageHeader implements IMessageHeader{
addElement(TOPIC);
addElement(MESSAGE_ID);
}
-
+
private <T extends Element> T addElement(T instance) {
instance.addPath(paths);
return instance;
@@ -81,7 +80,7 @@ public class OteEventMessageHeader implements IMessageHeader{
@Override
public Element[] getElements() {
- return new Element[]{MARKER, TOPIC};
+ return new Element[] {MARKER, TOPIC};
}
@Override
@@ -92,11 +91,9 @@ public class OteEventMessageHeader implements IMessageHeader{
@Override
public String toXml() {
StringBuilder builder = new StringBuilder(256);
- builder.append("<OteEventMessageHeader> ").
- append("MARKER=\"").append(MARKER.getValue()).append("\" ").
- append("TOPIC=\"").append(TOPIC.getValue()).append("\" ").
- append("MESSAGE_ID=\"").append(MESSAGE_ID.getValue()).append("\" ").
- append("</OteEventMessageHeader>");
+ builder.append("<OteEventMessageHeader> ").append("MARKER=\"").append(MARKER.getValue()).append("\" ").append(
+ "TOPIC=\"").append(TOPIC.getValue()).append("\" ").append("MESSAGE_ID=\"").append(
+ MESSAGE_ID.getValue()).append("\" ").append("</OteEventMessageHeader>");
return builder.toString();
}
diff --git a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/DomainParticipant.java b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/DomainParticipant.java
index 8b44be408e..847134a95b 100644
--- a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/DomainParticipant.java
+++ b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/DomainParticipant.java
@@ -298,10 +298,9 @@ public class DomainParticipant extends Entity implements EntityFactory {
} else {
// There is a violation, and no topic will be returned since a topic
// with this name already exists, but the types do not match
- throw new RuntimeException(
- String.format(
- "found topic name:[%s] namespace:[%s] but there was a type incompatibility between [%s] (from topic [%s]) and [%s].",
- name, namespace, topic.getTypeName(), topic.getName(), typeName));
+ throw new RuntimeException(String.format(
+ "found topic name:[%s] namespace:[%s] but there was a type incompatibility between [%s] (from topic [%s]) and [%s].",
+ name, namespace, topic.getTypeName(), topic.getName(), typeName));
}
} else { // Otherwise, the topic did not already exist
topic = new Topic(this, typeSignature, name, namespace, this.isEnabled(), topicListener, this);
@@ -337,11 +336,6 @@ public class DomainParticipant extends Entity implements EntityFactory {
return ReturnCode.PRECONDITION_NOT_MET;
}
- // Check that a topic was supplied
- if (topic == null) {
- return ReturnCode.ERROR;
- }
-
// Attempt to remove, if it did not exist in our list then return an error,
// since it can only be removed from the <code>DomainParticipant</code> which created it.
if (topics.containsKey(topic.getNamespace() + topic.getName())) {

Back to the top