null argument index: do not update default settings of inspections

This commit is contained in:
Dmitry Batkovich
2016-08-22 22:22:48 +03:00
parent 655d09b032
commit 4f4893cebd
2 changed files with 5 additions and 1 deletions
@@ -90,6 +90,9 @@ public class DataFlowInspectionBase extends BaseJavaBatchLocalInspectionTool {
if (TREAT_UNKNOWN_MEMBERS_AS_NULLABLE) {
node.addContent(new Element("option").setAttribute("name", "TREAT_UNKNOWN_MEMBERS_AS_NULLABLE").setAttribute("value", "true"));
}
if (!REPORT_NULLS_PASSED_TO_NOT_NULL_PARAMETER) {
node.addContent(new Element("option").setAttribute("name", "REPORT_NULLS_PASSED_TO_NOT_NULL_PARAMETER").setAttribute("value", "false"));
}
}
@Override
@@ -70,7 +70,8 @@ public class NullableStuffInspectionBase extends BaseJavaBatchLocalInspectionToo
String value = child.getAttributeValue("value");
if ("IGNORE_EXTERNAL_SUPER_NOTNULL".equals(name) && "false".equals(value) ||
"REPORT_NOTNULL_PARAMETERS_OVERRIDES_NOT_ANNOTATED".equals(name) && "false".equals(value) ||
"REQUIRE_NOTNULL_FIELDS_INITIALIZED".equals(name) && "true".equals(value)) {
"REQUIRE_NOTNULL_FIELDS_INITIALIZED".equals(name) && "true".equals(value) ||
"REPORT_NULLS_PASSED_TO_NOT_NULL_PARAMETER".equals(name) && "true".equals(value)) {
node.removeContent(child);
}
}