diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-06-09 09:49:07 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-06-09 12:27:18 +0200 |
commit | 786380bd5e06719ce86990824760d4408e1ae565 (patch) | |
tree | be5f74e82ab59a4ded895283291d278c19c9d056 /org.eclipse.jgit/src/org/eclipse/jgit/internal/transport | |
parent | f24ad3da66a0ea86f5674fac9442d3b4e4c78aa2 (diff) | |
download | jgit-786380bd5e06719ce86990824760d4408e1ae565.tar.gz jgit-786380bd5e06719ce86990824760d4408e1ae565.zip |
Warn if configured cookie file is missing
We logged a stack trace if the configured http.cookieFile was missing.
Instead only log a warning.
Bug: 548081
Change-Id: I42e39f5ad8ffce7b43162e5068f60af073b8a126
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/internal/transport')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFile.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFile.java index 93be5c69e3..075f55c733 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFile.java @@ -344,6 +344,11 @@ public final class NetscapeCookieFile { final int maxStaleRetries = 5; int retries = 0; File file = getPath().toFile(); + if (!file.exists()) { + LOG.warn(MessageFormat.format(JGitText.get().missingCookieFile, + file.getAbsolutePath())); + return new byte[0]; + } while (true) { final FileSnapshot oldSnapshot = snapshot; final FileSnapshot newSnapshot = FileSnapshot.save(file); |