If, for example, an external site links to a docs page or a specific
doc page, and the branch that link points to is no longer existing,
an internal error happens due to a NPE.
The NPE is guarded against and a No Docs page is returned.
\r
Repository r = getRepository();\r
RevCommit commit = JGitUtils.getCommit(r, objectId);\r
+ if (commit == null) {\r
+ setResponsePage(NoDocsPage.class, params);\r
+ return;\r
+ }\r
+\r
String [] encodings = getEncodings();\r
\r
// Read raw markup content and transform it to html\r
final boolean userCanEdit = currentUser.canEdit(getRepositoryModel());\r
\r
RevCommit head = JGitUtils.getCommit(r, objectId);\r
+ if (head == null) {\r
+ setResponsePage(NoDocsPage.class, params);\r
+ return;\r
+ }\r
final String commitId = getBestCommitId(head);\r
\r
List<String> extensions = processor.getAllExtensions();\r