EA-47034 (diagnostic, recovery)

This commit is contained in:
Roman Shevchenko
2013-06-26 20:46:19 +04:00
parent 592a01cdb5
commit 38f56df8d4
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
*/
package com.intellij.psi.impl.compiled;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.psi.*;
import com.intellij.psi.impl.source.SourceTreeToPsiMap;
import com.intellij.psi.impl.source.tree.TreeElement;
@@ -33,7 +34,10 @@ public class ClsAnnotationParameterListImpl extends ClsElementImpl implements Ps
for (int i = 0; i < myAttributes.length; i++) {
String name = psiAttributes[i].getName();
PsiAnnotationMemberValue value = psiAttributes[i].getValue();
assert value != null : "name=" + name + " value" + value;
if (value == null) {
Logger.getInstance(getClass()).error("name=" + name + " value=" + value + " anno=[" + parent.getText() + "]");
value = new ClsLiteralExpressionImpl(this, "null", PsiType.NULL, null);
}
myAttributes[i] = new ClsNameValuePairImpl(this, name, value);
}
}