Skip to content

Commit

Permalink
Fix embedded server to handle null outputDir and userDir
Browse files Browse the repository at this point in the history
  • Loading branch information
cherylking committed Jun 27, 2019
1 parent 0bb53e1 commit aa23d03
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ public File getOutputDir() {
public boolean equals(EmbeddedServerInfo info) {
return
this.serverName.equals(info.serverName)
&& this.userDir.getAbsolutePath().equals(info.userDir.getAbsolutePath())
&& this.outputDir.getAbsolutePath().equals(info.outputDir.getAbsolutePath());
&& ( (this.userDir == null && info.userDir == null) ||
(this.userDir != null && info.userDir != null &&
this.userDir.getAbsolutePath().equals(info.userDir.getAbsolutePath())) )
&& ( (this.outputDir == null && info.outputDir == null) ||
(this.outputDir != null && info.outputDir != null &&
this.outputDir.getAbsolutePath().equals(info.outputDir.getAbsolutePath())) );
}

public static class EmbeddedServers {
Expand Down

0 comments on commit aa23d03

Please sign in to comment.