JetValueParameter.nullable is deprecated as it duplicates info in type field

This commit is contained in:
Alex Tkachman
2012-09-23 13:19:51 +02:00
parent b70cc84764
commit 4600990d52
5 changed files with 2 additions and 19 deletions
@@ -997,10 +997,7 @@ public class JavaDescriptorResolver implements DependencyClassByQualifiedNameRes
else {
JetType transformedType;
if (parameter.getJetValueParameter().nullable()) {
transformedType = TypeUtils.makeNullableAsSpecified(outType, parameter.getJetValueParameter().nullable());
}
else if (findAnnotation(parameter.getPsiParameter(), JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().getFqName()) != null) {
if (findAnnotation(parameter.getPsiParameter(), JvmAbi.JETBRAINS_NOT_NULL_ANNOTATION.getFqName().getFqName()) != null) {
transformedType = TypeUtils.makeNullableAsSpecified(outType, false);
}
else {
@@ -37,7 +37,6 @@ public class JetValueParameterAnnotation extends PsiAnnotationWrapper {
private String name;
private String type;
private boolean nullable;
private boolean receiver;
private boolean hasDefaultValue;
@@ -45,7 +44,6 @@ public class JetValueParameterAnnotation extends PsiAnnotationWrapper {
protected void initialize() {
name = getStringAttribute(JvmStdlibNames.JET_VALUE_PARAMETER_NAME_FIELD, "");
type = getStringAttribute(JvmStdlibNames.JET_VALUE_PARAMETER_TYPE_FIELD, "");
nullable = getBooleanAttribute(JvmStdlibNames.JET_VALUE_PARAMETER_NULLABLE_FIELD, false);
receiver = getBooleanAttribute(JvmStdlibNames.JET_VALUE_PARAMETER_RECEIVER_FIELD, false);
hasDefaultValue = getBooleanAttribute(JvmStdlibNames.JET_VALUE_PARAMETER_HAS_DEFAULT_VALUE_FIELD, false);
}
@@ -62,11 +60,6 @@ public class JetValueParameterAnnotation extends PsiAnnotationWrapper {
return type;
}
public boolean nullable() {
checkInitialized();
return nullable;
}
public boolean receiver() {
checkInitialized();
return receiver;