Change annoying LOG.error to warn

Must be fixed with thread-safe JDR
This commit is contained in:
Alexander Udalov
2013-09-18 20:11:39 +04:00
parent 5b03178820
commit 7faf8ef92a
@@ -82,7 +82,11 @@ public class PsiBasedMethodSignatureChecker implements MethodSignatureChecker {
boolean paramsOk = overridableResult == OverridingUtil.OverrideCompatibilityInfo.Result.OVERRIDABLE;
boolean returnTypeOk = isReturnTypeOkForOverride(JetTypeChecker.INSTANCE, superFunctionSubstituted, function);
if (!paramsOk || !returnTypeOk) {
LOG.error("Loaded Java method overrides another, but resolved as Kotlin function, doesn't.\n"
// This should be a LOG.error, but happens a lot of times incorrectly (e.g. on Kotlin project), because somewhere in the
// type checker we compare two types which seem the same but have different instances of class descriptors. It happens
// probably because JavaDescriptorResolver is not completely thread-safe yet, and one class gets resolved multiple times.
// TODO: change to LOG.error when JavaDescriptorResolver becomes thread-safe
LOG.warn("Loaded Java method overrides another, but resolved as Kotlin function, doesn't.\n"
+ "super function = " + superFunction + "\n"
+ "super class = " + superFunction.getContainingDeclaration() + "\n"
+ "sub function = " + function + "\n"