Skip to content

Commit d8fed7e

Browse files
ctf: loosen struct check to silently accept null fields
Change-Id: Ief637e1c6bc49aca4bed87b586224df9383c1a9e Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
1 parent d37ffd3 commit d8fed7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ public StructDeclaration parse(ICTFMetadataNode declaration, ICommonTreeParserPa
128128
}
129129

130130
scope.registerIdentifier(fieldName, decl);
131-
if (struct.hasField(fieldName)) {
131+
IDeclaration current = struct.getField(fieldName);
132+
if (decl != null && current != null && !decl.equals(current)) {
132133
throw new ParseException("struct: duplicate field " //$NON-NLS-1$
133134
+ fieldName);
134135
}

0 commit comments

Comments
 (0)