CallHandler<CallChainSimplification> () { return CallHandler.of(STREAM_COLLECT, call -> { if (extractDelimiter(call) == null) return null; PsiMethodCallExpression qualifier = getQualifierMethodCall(call); if (qualifier == null) return null; if (ARRAYS_STREAM.matches(qualifier) || (COLLECTION_STREAM.matches(qualifier) && ExpressionUtils.getEffectiveQualifier(qualifier.getMethodExpression()) != null)) { PsiType elementType = StreamApiUtil.getStreamElementType(qualifier.getType()); if (InheritanceUtil.isInheritor(elementType, JAVA_LANG_CHAR_SEQUENCE)) { return new JoiningStringsFix(); } } return null; }); }