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
This commit is contained in:
@@ -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)/ */
|
||||
|
Reference in New Issue
Block a user