From aa804349e67ecee78bb9b475f9ac7dff9d29416a Mon Sep 17 00:00:00 2001 From: Edwin Kempin Date: Fri, 27 Dec 2013 16:06:34 +0100 Subject: [PATCH] Ignore incomplete GitWeb configuration For the GitWeb configuration it is required that all parameters are set. If a parameter is missing the GitWeb type is set to null and a warning is printed into the error log saying that GitWeb got disabled. However it is not really disabled, but some screens in the WebUI (e.g. the change screen) fail to load because a NullPointerExeception is hit due to the GitWeb type being null. It is very difficult to relate the JavaScript error to the incomplete GitWeb configuration. This problem occurred now because 79d4ebec49 made two more parameters mandatory. With this change Gerrit now doesn't try to add GitWebLinks if the GitWeb type is null. Change-Id: Ib060ce67e673e2553e7b220532d218ac9e56442b --- gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java index 7972e52341..9a6db2ff44 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java @@ -276,7 +276,7 @@ public class Gerrit implements EntryPoint { public static GitwebLink getGitwebLink() { GitwebConfig gw = getConfig().getGitwebLink(); - return gw != null ? new GitwebLink(gw) : null; + return gw != null && gw.type != null ? new GitwebLink(gw) : null; } /** Site theme information (site specific colors)/ */