diff --git a/java/java-impl/src/com/intellij/codeInspection/deadCode/DummyEntryPointsEP.java b/java/java-impl/src/com/intellij/codeInspection/deadCode/DummyEntryPointsEP.java index 82a0d83dbad8..01f982f07b45 100644 --- a/java/java-impl/src/com/intellij/codeInspection/deadCode/DummyEntryPointsEP.java +++ b/java/java-impl/src/com/intellij/codeInspection/deadCode/DummyEntryPointsEP.java @@ -24,6 +24,7 @@ public class DummyEntryPointsEP extends InspectionEP { public DummyEntryPointsEP() { presentation = DummyEntryPointsPresentation.class.getName(); displayName = InspectionsBundle.message("inspection.dead.code.entry.points.display.name"); + implementationClass = ""; shortName = ""; } diff --git a/platform/analysis-api/src/com/intellij/codeInspection/InspectionEP.java b/platform/analysis-api/src/com/intellij/codeInspection/InspectionEP.java index 0f1a7358a9f1..20972dbc886b 100644 --- a/platform/analysis-api/src/com/intellij/codeInspection/InspectionEP.java +++ b/platform/analysis-api/src/com/intellij/codeInspection/InspectionEP.java @@ -27,6 +27,7 @@ import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.ArrayUtil; import com.intellij.util.xmlb.annotations.Attribute; import org.jetbrains.annotations.Nls; +import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -52,6 +53,9 @@ public class InspectionEP extends LanguageExtensionPoint implements InspectionPr @NotNull public String getShortName() { + if (implementationClass == null) { + throw new IllegalArgumentException(toString()); + } return shortName == null ? InspectionProfileEntry.getShortName(StringUtil.getShortName(implementationClass)) : shortName; } @@ -166,4 +170,24 @@ public class InspectionEP extends LanguageExtensionPoint implements InspectionPr @Attribute("presentation") public String presentation; + + @NonNls + @Override + public String toString() { + return "InspectionEP{" + + "shortName='" + shortName + '\'' + + ", key='" + key + '\'' + + ", bundle='" + bundle + '\'' + + ", displayName='" + displayName + '\'' + + ", groupKey='" + groupKey + '\'' + + ", groupBundle='" + groupBundle + '\'' + + ", groupDisplayName='" + groupDisplayName + '\'' + + ", groupPath='" + groupPath + '\'' + + ", enabledByDefault=" + enabledByDefault + + ", applyToDialects=" + applyToDialects + + ", level='" + level + '\'' + + ", hasStaticDescription=" + hasStaticDescription + + ", presentation='" + presentation + '\'' + + '}'; + } }