oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.34k stars 745 forks source link

xref.jspf should check tempf being null before passing it to doCtags() #4187

Closed vladak closed 1 year ago

vladak commented 1 year ago

As described on https://github.com/oracle/opengrok/discussions/4185#discussioncomment-5120903 , there should be tempf != null check before https://github.com/oracle/opengrok/blob/aeef436bb6f52bc271c428198b0220dfc0acafa6/opengrok-web/src/main/webapp/xref.jspf#L104

vladak commented 1 year ago

Perhaps also better error handling in https://github.com/oracle/opengrok/blob/aeef436bb6f52bc271c428198b0220dfc0acafa6/opengrok-web/src/main/webapp/xref.jspf#L57-L77

Specifically, log a message if getRevision() returns false and also short circuit the further processing in the fall through to error message case.