Skip to content

NPE when displaying a diff #4468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vladak opened this issue Nov 3, 2023 · 4 comments · Fixed by #4469
Closed

NPE when displaying a diff #4468

vladak opened this issue Nov 3, 2023 · 4 comments · Fixed by #4469
Assignees
Labels
bug UI webapp web application

Comments

@vladak
Copy link
Member

vladak commented Nov 3, 2023

When displaying a diff between two revisions in the latest master I am getting a NPE:

java.lang.NullPointerException
	at org.apache.jsp.diff_jsp._jspService(diff_jsp.java:722)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:71)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:770)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:467)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
...

Looking at the diff_jsp.java file in the Tomcat's work directory I see it happens here:

} else if (data.getRevision().size() == 0) { 
@vladak vladak added bug UI webapp web application labels Nov 3, 2023
@vladak
Copy link
Member Author

vladak commented Nov 3, 2023

This corresponds to

} else if (data.getRevision().size() == 0) {

In the debugger I see the revision field being null indeed.

@vladak
Copy link
Member Author

vladak commented Nov 3, 2023

Tracing the execution, this branch is taken:

if (Objects.isNull(data.errorMsg)) {
return;
}

so the revisions are not filled.

@vladak
Copy link
Member Author

vladak commented Nov 3, 2023

After flipping the condition, the diff starts working.

@vladak
Copy link
Member Author

vladak commented Nov 3, 2023

Introduced in 667c06e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug UI webapp web application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants