Skip to content

Commit

Permalink
Fixed possible NPE in WebFxModuleFile
Browse files Browse the repository at this point in the history
  • Loading branch information
salmonb committed Jun 21, 2024
1 parent e06fcab commit ddf70d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,12 @@ default Document createInitialDocument() {

default void setExecutable(boolean executable) {
if (executable != isExecutable()) {
getModuleElement().addAttribute("executable", String.valueOf(executable));
Element moduleElement = getModuleElement();
if (moduleElement == null) {
getOrCreateDocument();
moduleElement = getModuleElement();
}
moduleElement.addAttribute("executable", String.valueOf(executable));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.Node;

import java.util.Arrays;
import java.util.Collections;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/dev/webfx/cli/version/dev/version.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=0.1.0-SNAPSHOT
build.timestamp=2024-06-21 11:14
build.timestamp=2024-06-21 16:39

0 comments on commit ddf70d3

Please sign in to comment.