fix new byte[]null in lookups

This commit is contained in:
peter
2012-07-24 10:06:00 +02:00
parent 7a9eddae63
commit 0364eb48a6
3 changed files with 13 additions and 1 deletions
@@ -226,7 +226,7 @@ public class PsiTypeLookupItem extends LookupItem {
}
if (myBracketsCount > 0) {
presentation.setTailText(StringUtil.repeat("[]", myBracketsCount) + presentation.getTailText(), true);
presentation.setTailText(StringUtil.repeat("[]", myBracketsCount) + StringUtil.notNullize(presentation.getTailText()), true);
}
}
@@ -0,0 +1,5 @@
class A {
byte[] m() {
return new <caret>x;
}
}
@@ -612,6 +612,13 @@ public class SmartTypeCompletionTest extends LightFixtureCompletionTestCase {
assertEquals("[] (java.lang)", LookupElementPresentation.renderElement(myItems[1]).getTailText());
}
public void testNewByteArray() {
configureByTestName();
assertStringItems("byte");
assertEquals("[]", LookupElementPresentation.renderElement(myItems[0]).getTailText());
}
public void testInsideStringLiteral() throws Throwable { doAntiTest(); }
public void testDefaultAnnoParam() throws Throwable { doTest(); }