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"
47
47
%>
48
48
<%@ page import =" jakarta.servlet.http.HttpServletResponse" %>
49
49
<%@ page import =" org.opengrok.indexer.web.SortOrder" %>
50
+ <%@ page import =" java.util.Optional" %>
50
51
<% /* ---------------------- history.jsp start --------------------- */
51
52
{
52
53
final Logger LOGGER = LoggerFactory . getLogger(getClass());
@@ -257,17 +258,15 @@ document.domReady.push(function() {domReadyHistory();});
257
258
<%
258
259
int count= 0 ;
259
260
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(" " );
270
268
269
+ String tags = hist. getTags(). get(rev);
271
270
if (tags != null ) {
272
271
int colspan;
273
272
if (cfg. isDir())
You can’t perform that action at this time.
0 commit comments