void (@NotNull PsiLiteralExpression expression) { final String text = expression.getText(); if (StringUtil.isQuotedString(text)) { @Nullable final MatchingHandler handler = myCompilingVisitor.processPatternStringWithFragments(text, LITERAL); if (PsiTypes.charType().equals(expression.getType()) && (handler instanceof LiteralWithSubstitutionHandler || handler == null && expression.getValue() == null)) { throw new MalformedPatternException(SSRBundle.message("error.bad.character.literal")); } if (handler != null) { expression.putUserData(CompiledPattern.HANDLER_KEY, handler); } } else { if (!PsiTypes.nullType().equals(expression.getType()) && expression.getValue() == null) { throw new MalformedPatternException(SSRBundle.message("error.bad.literal")); } } super.visitLiteralExpression(expression); }