Commit cc55ae97 authored by Adam Knapp's avatar Adam Knapp
Browse files

Fixing internal error for charstring with subtype (issue #429)


Signed-off-by: Adam Knapp's avatarAdam Knapp <adam.knapp@ericsson.com>
parent 41376492
......@@ -199,7 +199,7 @@ public final class CharString_Type extends Type {
break;
case CHARSYMBOLS_VALUE:
case UNIVERSALCHARSTRING_VALUE:
last.setValuetype(timestamp, Value_type.CHARSTRING_VALUE);
last = last.setValuetype(timestamp, Value_type.CHARSTRING_VALUE);
break;
case CHARSTRING_VALUE:
case ISO2022STRING_VALUE:
......
......@@ -1098,11 +1098,18 @@ public final class SubType implements IIncrementallyUpdateable {
}
break;
case UNIVERSALCHARSTRING_VALUE:
if (subtypeType != SubType_type.ST_UNIVERSAL_CHARSTRING) {
switch (subtypeType) {
case ST_CHARSTRING:
isValid = subtypeConstraint.isElement(
Charstring_Value.convert(timestamp, (UniversalCharstring_Value) last).getValue());
break;
case ST_UNIVERSAL_CHARSTRING:
isValid = subtypeConstraint.isElement(((UniversalCharstring_Value) last).getValue());
break;
default:
ErrorReporter.INTERNAL_ERROR();
return;
}
isValid = subtypeConstraint.isElement(((UniversalCharstring_Value) last).getValue());
break;
case SEQUENCEOF_VALUE:
case SETOF_VALUE:
......
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