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());