@NotNull ExtensionPointName
authorDaniil Ovchinnikov <daniil.ovchinnikov@jetbrains.com>
Fri, 28 Oct 2016 14:59:13 +0000 (17:59 +0300)
committerDaniil Ovchinnikov <daniil.ovchinnikov@jetbrains.com>
Fri, 28 Oct 2016 15:19:04 +0000 (18:19 +0300)
platform/extensions/src/com/intellij/openapi/extensions/ExtensionPointName.java
platform/platform-impl/src/org/jetbrains/ide/HttpRequestHandler.kt

index 9e1a199bcd695ccd367e9c77f9e53d190a317ae3..974a8a1e7fdd419785c792eb7353ccb7938c56bb 100644 (file)
@@ -26,19 +26,20 @@ import org.jetbrains.annotations.NotNull;
 public class ExtensionPointName<T> {
   private final String myName;
 
-  public ExtensionPointName(@NonNls final String name) {
+  public ExtensionPointName(@NotNull @NonNls final String name) {
     myName = name;
   }
 
-  public static <T> ExtensionPointName<T> create(@NonNls final String name) {
+  @NotNull
+  public static <T> ExtensionPointName<T> create(@NotNull @NonNls final String name) {
     return new ExtensionPointName<T>(name);
   }
 
+  @NotNull
   public String getName() {
     return myName;
   }
 
-
   @Override
   public String toString() {
     return myName;
@@ -49,6 +50,7 @@ public class ExtensionPointName<T> {
     return Extensions.getExtensions(this);
   }
 
+  @NotNull
   public T[] getExtensions(AreaInstance areaInstance) {
     return Extensions.getExtensions(this, areaInstance);
   }
index 7ce47dc90f7c0cc312ef05b1c43c4a673e392c53..9c1ba621df125a34bb68db9b9f89d63df0c37058 100644 (file)
@@ -29,7 +29,7 @@ import java.io.IOException
 abstract class HttpRequestHandler {
   companion object {
     // Your handler will be instantiated on first user request
-    val EP_NAME = ExtensionPointName.create<HttpRequestHandler>("com.intellij.httpRequestHandler")!!
+    val EP_NAME = ExtensionPointName.create<HttpRequestHandler>("com.intellij.httpRequestHandler")
 
     @JvmStatic
     fun checkPrefix(uri: String, prefix: String): Boolean {