Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public String getServerContextPath() {

public String getKeyStorePath() {
String path = getString(ConfVars.ZEPPELIN_SSL_KEYSTORE_PATH);
if (path != null && path.startsWith("/") || isWindowsPath(path)) {
if (path != null && (path.startsWith("/") || isWindowsPath(path))) {
return path;
} else {
return getAbsoluteDir(
Expand Down Expand Up @@ -385,7 +385,7 @@ public String getTrustStorePath() {
if (path == null) {
path = getKeyStorePath();
}
if (path != null && path.startsWith("/") || isWindowsPath(path)) {
if (path != null && (path.startsWith("/") || isWindowsPath(path))) {
return path;
} else {
return getAbsoluteDir(
Expand Down Expand Up @@ -667,7 +667,7 @@ public String getInterpreterPortRange() {
}

public boolean isWindowsPath(String path){
return path.matches("^[A-Za-z]:\\\\.*");
return path != null && path.matches("^[A-Za-z]:\\\\.*");
}

public boolean isPathWithScheme(String path){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ void isWindowsPathTestFalse() {
assertFalse(isIt);
}

@Test
void isWindowsPathTestNull() {

ZeppelinConfiguration zConf = ZeppelinConfiguration.load("zeppelin-test-site.xml");
Boolean isIt = zConf.isWindowsPath(null);
assertFalse(isIt);
}

@Test
void isPathWithSchemeTestTrue() {

Expand Down
Loading