mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[xtext] Fix: IOOBE for heavily broken Xtext grammars, e.g. with unclosed EPackage URIs
This commit is contained in:
parent
c1b3cbf737
commit
dc7a65287f
1 changed files with 2 additions and 0 deletions
|
@ -222,6 +222,8 @@ public class XtextLinkingService extends DefaultLinkingService {
|
|||
return null;
|
||||
if (uri.fragment() == null) {
|
||||
Resource resource = resourceSet.getResource(uri, true);
|
||||
if (resource.getContents().isEmpty())
|
||||
return null;
|
||||
EPackage result = (EPackage) resource.getContents().get(0);
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue