diff --git a/litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/LithoPluginUtils.java b/litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/LithoPluginUtils.java index 9a3ef9a257..0da3c32d48 100644 --- a/litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/LithoPluginUtils.java +++ b/litho-intellij-plugin/src/main/java/com/facebook/litho/intellij/LithoPluginUtils.java @@ -16,6 +16,7 @@ package com.facebook.litho.intellij; +import com.facebook.infer.annotation.Nullsafe; import com.facebook.litho.annotations.Event; import com.facebook.litho.annotations.LayoutSpec; import com.facebook.litho.annotations.MountSpec; @@ -53,6 +54,7 @@ import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.Nullable; +@Nullsafe(Nullsafe.Mode.LOCAL) public class LithoPluginUtils { private static final NotificationGroup NOTIFICATION_GROUP = NotificationGroup.balloonGroup("Litho"); @@ -169,6 +171,7 @@ public static boolean isEvent(PsiClass psiClass) { @Contract("null -> null") public static String getLithoComponentNameFromSpec(@Nullable String specName) { if (isSpecName(specName)) { + // NULLSAFE_FIXME[Nullable Dereference] return specName.substring(0, specName.length() - SPEC_SUFFIX.length()); } return null;