File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
opengrok-web/src/main/webapp Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ org.opengrok.indexer.web.Util"
4747%>
4848<%@ page import =" jakarta.servlet.http.HttpServletResponse" %>
4949<%@ page import =" org.opengrok.indexer.web.SortOrder" %>
50+ <%@ page import =" java.util.Optional" %>
5051<% /* ---------------------- history.jsp start --------------------- */
5152{
5253 final Logger LOGGER = LoggerFactory . getLogger(getClass());
@@ -257,17 +258,15 @@ document.domReady.push(function() {domReadyHistory();});
257258 <%
258259 int count= 0 ;
259260 for (HistoryEntry entry : hist. getHistoryEntries(maxItems, startIndex)) {
260- String dispRev = entry. getDisplayRevision();
261- if (dispRev == null || dispRev. isEmpty()) {
262- dispRev = " " ;
263- }
264- dispRev = Util . htmlize(dispRev);
265- String rev = entry. getRevision();
266- if (rev == null || rev. isEmpty()) {
267- rev = " " ;
268- }
269- String tags = hist. getTags(). get(rev);
261+ final String dispRev = Optional . ofNullable(entry).
262+ map(HistoryEntry :: getDisplayRevision).
263+ map(Util :: htmlize).
264+ orElse(" " );
265+ final String rev = Optional . ofNullable(entry).
266+ map(HistoryEntry :: getRevision).
267+ orElse(" " );
270268
269+ String tags = hist. getTags(). get(rev);
271270 if (tags != null ) {
272271 int colspan;
273272 if (cfg. isDir())
You can’t perform that action at this time.
0 commit comments