Skip to content

Commit 8ecd5c9

Browse files
Merge pull request #1117 from Iamwade/1113-fixed-not-null-parameter
1113: Fixed IllegalArgumentException: Argument for @NotNull parameter 'dataKey' must not be null in CompareTemplateAction
2 parents f26b82e + 7a5d78f commit 8ecd5c9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/com/magento/idea/magento2plugin/actions/comparator/CompareTemplateAction.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public CompareTemplateAction() {
4949
*
5050
* @param event AnActionEvent
5151
*/
52-
@SuppressWarnings("PMD.NPathComplexity")
5352
@Override
53+
@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.NPathComplexity"})
5454
public void update(final @NotNull AnActionEvent event) {
5555
setStatus(event, false);
5656
final Project project = event.getData(PlatformDataKeys.PROJECT);
@@ -83,6 +83,9 @@ public void update(final @NotNull AnActionEvent event) {
8383
}
8484
final String originalModuleName = getOriginalModuleName(project, psiFile);
8585

86+
if (originalModuleName == null) {
87+
return;
88+
}
8689
final PsiDirectory originalModuleDirectory =
8790
new ModuleIndex(project).getModuleDirectoryByModuleName(originalModuleName);
8891

0 commit comments

Comments
 (0)