Commit d2089cad authored by Lenard Nagy's avatar Lenard Nagy
Browse files

Simplified solution for Preventing crash in case of deleted file in the...


Simplified solution for Preventing crash in case of deleted file in the workspace (eforge artifact artf649556)
Signed-off-by: Lenard Nagy's avatarLenard Nagy (elnrnag) <lenard.nagy@ericsson.com>
parent 3e02f423
...@@ -174,13 +174,15 @@ public final class CfgAnalyzer { ...@@ -174,13 +174,15 @@ public final class CfgAnalyzer {
} }
public List<SyntacticErrorStorage> getErrorStorage() { public List<SyntacticErrorStorage> getErrorStorage() {
if (lexerListener != null && !lexerListener.getErrorsStored().isEmpty() && parserListener != null && parserListener.getErrorsStored().isEmpty()) { if (lexerListener != null && parserListener != null) {
return lexerListener.getErrorsStored(); if (!lexerListener.getErrorsStored().isEmpty() && parserListener.getErrorsStored().isEmpty()) {
} else if (lexerListener != null && lexerListener.getErrorsStored().isEmpty() && parserListener != null && !parserListener.getErrorsStored().isEmpty()) {
return parserListener.getErrorsStored();
} else if (lexerListener != null && !lexerListener.getErrorsStored().isEmpty() && parserListener != null && !parserListener.getErrorsStored().isEmpty()) {
if (lexerListener.addAll(parserListener.getErrorsStored())) {
return lexerListener.getErrorsStored(); return lexerListener.getErrorsStored();
} else if (lexerListener.getErrorsStored().isEmpty() && !parserListener.getErrorsStored().isEmpty()) {
return parserListener.getErrorsStored();
} else if (!lexerListener.getErrorsStored().isEmpty() && !parserListener.getErrorsStored().isEmpty()) {
if (lexerListener.addAll(parserListener.getErrorsStored())) {
return lexerListener.getErrorsStored();
}
} }
} }
return new ArrayList<SyntacticErrorStorage>(); return new ArrayList<SyntacticErrorStorage>();
......
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