We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60e2926 commit fa213acCopy full SHA for fa213ac
src/main/java/com/magento/idea/magento2plugin/util/magento/GetModuleNameByDirectoryUtil.java
@@ -32,9 +32,13 @@ private GetModuleNameByDirectoryUtil() {}
32
* @return String
33
*/
34
public static @Nullable String execute(
35
- final @NotNull PsiDirectory psiDirectory,
+ final @Nullable PsiDirectory psiDirectory,
36
final @NotNull Project project
37
) {
38
+ // Gracefully handle null directory inputs from callers
39
+ if (psiDirectory == null) {
40
+ return null;
41
+ }
42
// Check if directory is theme directory and return module name from directory path if yes
43
final String path = psiDirectory.getVirtualFile().getPath();
44
final Pattern pattern = Pattern.compile(RegExUtil.CustomTheme.MODULE_NAME);
0 commit comments