Skip to content

Commit

Permalink
fixed not null
Browse files Browse the repository at this point in the history
  • Loading branch information
zengkid committed Aug 14, 2020
1 parent 017570f commit 428f7b9
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ public boolean isConfigurationFromContext(@NotNull TomcatRunConfiguration config
VirtualFile vf = context.getLocation().getVirtualFile();
if (vf != null && vf.isDirectory()) {
Module module = context.getModule();
Optional<VirtualFile> webModule = getWebModule(module);
boolean isWebModule = webModule.isPresent();
if (isWebModule) {
VirtualFile virtualFile = webModule.get();
if (vf.getCanonicalPath().equals(virtualFile.getCanonicalPath())) {
result = true;
if (module != null) {
Optional<VirtualFile> webModule = getWebModule(module);
boolean isWebModule = webModule.isPresent();
if (isWebModule) {
VirtualFile virtualFile = webModule.get();
if (vf.getCanonicalPath().equals(virtualFile.getCanonicalPath())) {
result = true;
}
}
}
}
Expand Down

0 comments on commit 428f7b9

Please sign in to comment.