void (@NotNull PsiBinaryExpression binOp) { if (!WARN_ON_COMPARISON) return; PsiExpression value = ExpressionUtils.getValueComparedWithNull(binOp); if (value != null && TypeUtils.isOptional(value.getType()) && !hasSubsequentIsPresentCall(value, binOp, JavaTokenType.EQEQ.equals(binOp.getOperationTokenType())) && !comesFromMapGet(value)) { boolean useIsEmpty = binOp.getOperationTokenType().equals(JavaTokenType.EQEQ) && PsiUtil.isLanguageLevel11OrHigher(binOp); holder.problem(binOp, JavaBundle.message("inspection.null.value.for.optional.assigned.message")) .fix(new ReplaceWithIsPresentFix(useIsEmpty)) .fix(new UpdateInspectionOptionFix(OptionalAssignedToNullInspection.this, "WARN_ON_COMPARISON", JavaBundle.message("inspection.null.value.for.optional.assigned.ignore.fix.name"), false)) .register(); } }