KT-697 Remove unnecessary NotNull annotation import from Kotlin code

This commit is contained in:
Sergey Ignatov
2011-12-05 15:39:33 +04:00
parent 9442dfd2a9
commit 82ff073a43
5 changed files with 7 additions and 4 deletions
+3 -1
View File
@@ -432,7 +432,9 @@ public class Converter {
@NotNull @NotNull
private static List<Import> importsToImportList(@NotNull PsiImportStatementBase[] imports) { private static List<Import> importsToImportList(@NotNull PsiImportStatementBase[] imports) {
List<Import> result = new LinkedList<Import>(); List<Import> result = new LinkedList<Import>();
for (PsiImportStatementBase t : imports) result.add(importToImport(t)); for (PsiImportStatementBase i : imports)
if (!NOT_NULL_ANNOTATIONS.contains(importToImport(i).getName()))
result.add(importToImport(i));
return result; return result;
} }
@@ -8,6 +8,10 @@ import org.jetbrains.annotations.NotNull;
public class Import extends Node { public class Import extends Node {
private final String myName; private final String myName;
public String getName() {
return myName;
}
public Import(String name) { public Import(String name) {
myName = name; myName = name;
} }
@@ -1,5 +1,4 @@
namespace test namespace test
import org.jetbrains.annotations.NotNull
public open class Test(str : String) { public open class Test(str : String) {
{ {
$myStr = str $myStr = str
@@ -1,4 +1,3 @@
namespace org.jetbrains.jet.j2k namespace org.jetbrains.jet.j2k
import org.jetbrains.annotations.NotNull
public open class Converter() { public open class Converter() {
} }
@@ -1,5 +1,4 @@
namespace org.jetbrains.jet.j2k.`in` namespace org.jetbrains.jet.j2k.`in`
import org.jetbrains.annotations.NotNull
import org.jetbrains.annotations.Nullable import org.jetbrains.annotations.Nullable
public open class Converter() { public open class Converter() {
} }