From 6929cf714fa65f9302885d840823eabe8e4e89ee Mon Sep 17 00:00:00 2001 From: Gregory Shrago Date: Tue, 12 Oct 2010 19:12:49 +0400 Subject: [PATCH] EA-22509 - IOE: StringLiteralManipulator.handleContentChange logging --- .../reference/impl/manipulators/StringLiteralManipulator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/StringLiteralManipulator.java b/java/java-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/StringLiteralManipulator.java index 342e7da61776..6fa82762c7d7 100644 --- a/java/java-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/StringLiteralManipulator.java +++ b/java/java-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/StringLiteralManipulator.java @@ -28,7 +28,8 @@ import com.intellij.util.IncorrectOperationException; */ public class StringLiteralManipulator extends AbstractElementManipulator { public PsiLiteralExpression handleContentChange(PsiLiteralExpression expr, TextRange range, String newContent) throws IncorrectOperationException { - if (!(expr.getValue() instanceof String)) throw new IncorrectOperationException("cannot handle content change"); + final Object value = expr.getValue(); + if (!(value instanceof String)) throw new IncorrectOperationException("cannot handle content change for: "+ value); String oldText = expr.getText(); newContent = StringUtil.escapeStringCharacters(newContent); String newText = oldText.substring(0, range.getStartOffset()) + newContent + oldText.substring(range.getEndOffset());