Commit 93228284 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

style improvement and removed superfluous fixmes


Signed-off-by: Kristof Szabados's avatarkristof <Kristof.Szabados@ericsson.com>
parent b4eefba4
...@@ -168,9 +168,6 @@ public class TitanCharString_template extends Restricted_Length_Template { ...@@ -168,9 +168,6 @@ public class TitanCharString_template extends Restricted_Length_Template {
setSelection(otherValue); setSelection(otherValue);
} }
// FIXME: getAt
// FIXME: constGetAt
// originally operator[](int index_value) // originally operator[](int index_value)
public TitanCharString_Element getAt(final int index) { public TitanCharString_Element getAt(final int index) {
if (templateSelection != template_sel.SPECIFIC_VALUE || is_ifPresent) { if (templateSelection != template_sel.SPECIFIC_VALUE || is_ifPresent) {
...@@ -383,7 +380,6 @@ public class TitanCharString_template extends Restricted_Length_Template { ...@@ -383,7 +380,6 @@ public class TitanCharString_template extends Restricted_Length_Template {
} }
} }
// FIXME: lengthOf
// originally lengthOf // originally lengthOf
public TitanInteger lengthOf() { public TitanInteger lengthOf() {
int min_length = 0; int min_length = 0;
...@@ -430,9 +426,7 @@ public class TitanCharString_template extends Restricted_Length_Template { ...@@ -430,9 +426,7 @@ public class TitanCharString_template extends Restricted_Length_Template {
return new TitanInteger(check_section_is_single(min_length, has_any_or_none, "length", "a", "charstring template")); return new TitanInteger(check_section_is_single(min_length, has_any_or_none, "length", "a", "charstring template"));
} }
// FIXME: set_min
// originally set_min // originally set_min
public void setMin(final TitanCharString otherMinValue) { public void setMin(final TitanCharString otherMinValue) {
if (templateSelection != template_sel.VALUE_RANGE) { if (templateSelection != template_sel.VALUE_RANGE) {
throw new TtcnError("Setting the lower bound for a non-range charstring template."); throw new TtcnError("Setting the lower bound for a non-range charstring template.");
...@@ -451,10 +445,7 @@ public class TitanCharString_template extends Restricted_Length_Template { ...@@ -451,10 +445,7 @@ public class TitanCharString_template extends Restricted_Length_Template {
} }
} }
// FIXME: set_max
// originally set_max // originally set_max
public void setMax(final TitanCharString otherMaxValue) { public void setMax(final TitanCharString otherMaxValue) {
if (templateSelection != template_sel.VALUE_RANGE) { if (templateSelection != template_sel.VALUE_RANGE) {
throw new TtcnError("Setting the upper bound for a non-range charstring template."); throw new TtcnError("Setting the upper bound for a non-range charstring template.");
...@@ -493,6 +484,7 @@ public class TitanCharString_template extends Restricted_Length_Template { ...@@ -493,6 +484,7 @@ public class TitanCharString_template extends Restricted_Length_Template {
switch (templateSelection) { switch (templateSelection) {
case STRING_PATTERN: case STRING_PATTERN:
//FIXME: implement string pattern //FIXME: implement string pattern
break;
case SPECIFIC_VALUE: { case SPECIFIC_VALUE: {
single_value.log(); single_value.log();
break; break;
...@@ -521,7 +513,7 @@ public class TitanCharString_template extends Restricted_Length_Template { ...@@ -521,7 +513,7 @@ public class TitanCharString_template extends Restricted_Length_Template {
TtcnLogger.log_char('"'); TtcnLogger.log_char('"');
} else { } else {
TtcnLogger.log_event(MessageFormat.format("char({0}, {1}, {2}, {3})", max_value)); TtcnLogger.log_event_str(MessageFormat.format("char(0, 0, 0, 0)", (int)min_value.getValue().charAt( 0 )));
} }
} else { } else {
TtcnLogger.log_event_str("<unknown lower bound>"); TtcnLogger.log_event_str("<unknown lower bound>");
...@@ -535,15 +527,18 @@ public class TitanCharString_template extends Restricted_Length_Template { ...@@ -535,15 +527,18 @@ public class TitanCharString_template extends Restricted_Length_Template {
TtcnLogger.log_char('"'); TtcnLogger.log_char('"');
TtcnLogger.logCharEscaped(max_value.getValue().charAt( 0 )); TtcnLogger.logCharEscaped(max_value.getValue().charAt( 0 ));
TtcnLogger.log_char('"'); TtcnLogger.log_char('"');
} else {
TtcnLogger.log_event_str(MessageFormat.format("char(0, 0, 0, 0)", (int)max_value.getValue().charAt( 0 )));
}
} else { } else {
TtcnLogger.log_event_str("<unknown upper bound>"); TtcnLogger.log_event_str("<unknown upper bound>");
} }
TtcnLogger.log_char(')'); TtcnLogger.log_char(')');
break; break;
}
case DECODE_MATCH: case DECODE_MATCH:
//FIXME: implement decode match //FIXME: implement decode match
break;
default: default:
log_generic(); log_generic();
break; break;
...@@ -551,12 +546,4 @@ public class TitanCharString_template extends Restricted_Length_Template { ...@@ -551,12 +546,4 @@ public class TitanCharString_template extends Restricted_Length_Template {
log_restricted(); log_restricted();
log_ifpresent(); log_ifpresent();
} }
//TODO: test isPresent
//TODO: test lengthOf
//TODO: test setType
//TODO: test setMax
//TODO: test setMin
//TODO: test setMinExclusive
//TODO: test setMaxExclusive
} }
\ No newline at end of file
...@@ -140,10 +140,9 @@ public class TitanPort { ...@@ -140,10 +140,9 @@ public class TitanPort {
clearQueue(); clearQueue();
} else { } else {
if(is_halted) { if(is_halted) {
// the queue might contain old messages which has to be discarded
// the queue might contain old messages which has to be discarded clearQueue();
clearQueue(); is_halted = false;
is_halted = false;
} }
userStart(); userStart();
is_started = true; is_started = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment