Skip to content

Commit

Permalink
Merge pull request #258 from mrubanov/flakyTestFix
Browse files Browse the repository at this point in the history
Catch the StackOverflowError
  • Loading branch information
mrubanov authored Sep 10, 2019
2 parents 012c732 + 75b82fb commit de47bad
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,19 @@ public IEObjectDescription getSingleElement(final QualifiedName name) {
if (name == null) {
throw new IllegalArgumentException("Null name in getContentByName"); //$NON-NLS-1$
}
for (final IScope scope : getDelegates()) {
final IEObjectDescription elem = scope.getSingleElement(name);
if (elem != null) {
// ScopeTrace.addTrace(elem, getId());
return elem;

try {
for (final IScope scope : getDelegates()) {
final IEObjectDescription elem = scope.getSingleElement(name);
if (elem != null) {
// ScopeTrace.addTrace(elem, getId());
return elem;
}
}
return getParent().getSingleElement(name);
} catch (StackOverflowError e) {
return STACK_OVERFLOW_EOBJECT_DESCRIPTION;
}
return getParent().getSingleElement(name);
}

@Override
Expand Down

0 comments on commit de47bad

Please sign in to comment.