Skip to content

Commit b25ee86

Browse files
ctf: fix if type is not declared explicity, but as a subfield
Change-Id: Ib3654d5468236a9e3ab1a2a2b0cb49dbfc76e251 Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
1 parent 1d8c10a commit b25ee86

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/internal/ctf/core/event/metadata/tsdl

ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/internal/ctf/core/event/metadata/tsdl/TypeAliasParser.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ public IDeclaration parse(ICTFMetadataNode typealias, ICommonTreeParserParameter
138138
}
139139
}
140140
if (fieldClass != null) {
141+
if (type.isEmpty()) {
142+
if (fieldClass.isJsonObject()) {
143+
type = fieldClass.get(JsonMetadataStrings.TYPE).getAsString();
144+
}
145+
}
141146
if (JsonMetadataStrings.FIXED_UNSIGNED_INTEGER_FIELD.equals(type)) {
142147
fieldClass.addProperty(SIGNED, false);
143148
fieldClass.addProperty(VARINT, false);

0 commit comments

Comments
 (0)