IDEA-65657 (better check applicability)

This commit is contained in:
Roman Shevchenko
2011-02-17 17:19:04 +01:00
parent 8de82e1f03
commit 3578202b39
@@ -39,7 +39,10 @@ public class InsertLiteralUnderscoresAction extends PsiElementBaseIntentionActio
!PsiType.FLOAT.equals(type) && !PsiType.DOUBLE.equals(type)) return false;
final String text = literalExpression.getText();
return text != null && !text.contains("_");
if (text == null || text.contains("_")) return false;
final String converted = LiteralFormatUtil.format(text, type);
return converted.length() != text.length();
}
@Override