Skip to content

Commit

Permalink
Merge pull request #100 from cherylking/embeddedServerFix
Browse files Browse the repository at this point in the history
Fix embedded server to handle null outputDir and userDir and add testing with 19.0.0.6
  • Loading branch information
cherylking committed Jun 28, 2019
2 parents 0bb53e1 + bb92a82 commit 8837b9d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ jdk:
- oraclejdk9
- oraclejdk11
env:
- WLP_VERSION=18.0.0_04 WLP_LICENSE=L-CTUR-B4WNHE
- WLP_VERSION=19.0.0_03 WLP_LICENSE=L-CTUR-B9JQES
matrix:
exclude:
- jdk: oraclejdk11
env: WLP_VERSION=18.0.0_04 WLP_LICENSE=L-CTUR-B4WNHE
- WLP_VERSION=19.0.0_06 WLP_LICENSE=L-CTUR-BCTPHF
script:
- travis_wait mvn verify -Ponline-its -Dinvoker.streamLogs=true -DwlpVersion=$WLP_VERSION -DwlpLicense=$WLP_LICENSE -e
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
environment:
matrix:
- jdk: "C:\\Program Files\\Java\\jdk1.8.0\\bin:"
WLP_VERSION: 18.0.0_04
WLP_LICENSE: L-CTUR-B4WNHE
- jdk: "C:\\Program Files\\Java\\jdk1.8.0\\bin:"
WLP_VERSION: 19.0.0_03
WLP_LICENSE: L-CTUR-B9JQES
- jdk: "C:\\Program Files\\Java\\jdk1.8.0\\bin:"
WLP_VERSION: 19.0.0_06
WLP_LICENSE: L-CTUR-BCTPHF

install:
- cmd: |
Expand Down
13 changes: 10 additions & 3 deletions src/main/java/net/wasdev/wlp/ant/types/EmbeddedServerInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,16 @@ 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.serverName.equals(info.serverName) &&
areFilesEqual(this.userDir, info.userDir) &&
areFilesEqual(this.outputDir, info.outputDir);
}

private boolean areFilesEqual(File file1, File file2) {
if (file1 != null && file2 != null) {
return file1.getAbsolutePath().equals(file2.getAbsolutePath());
}
return (file1 == null && file2 == null);
}

public static class EmbeddedServers {
Expand Down

0 comments on commit 8837b9d

Please sign in to comment.