Issue Details (XML | Word | Printable)

Key: JRA-13199
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Brad Baker [Atlassian]
Reporter: Jed Wesley-Smith [Atlassian]
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JIRA

Easy NPE in Browse Version

Created: 30/Jul/07 12:42 AM   Updated: 15/Oct/07 09:38 PM
Component/s: Project Management, Web interface
Affects Version/s: 3.10
Fix Version/s: 3.10.2

Time Tracking:
Not Specified

Environment: any JIRA 3.10

Participants: Anton Mazkovoi [Atlassian], Brad Baker [Atlassian] and Jed Wesley-Smith [Atlassian]
Since last comment: 1 year, 3 weeks, 2 days ago
Resolution Date: 16/Aug/07 06:21 PM
Labels:


 Description  « Hide
Browsing for non-existent versions within a project produces inconsistent results. Most commonly it will throw a NPE.

http://jira.atlassian.com/browse/JRA/fixforversion/1
boom!

it will also 500 with any number of digits up to:
http://jira.atlassian.com/browse/JRA/fixforversion/11111111111111111111
which will simply go to the Browse Project screen (same as if there is no fix version specified).

We need to handle this properly. VersionContextImpl should not be able to be built with a null version, and the validation in the action should return a nice error page.

java.lang.NullPointerException
	at com.atlassian.jira.plugin.versionpanel.VersionContextImpl.getProject(VersionContextImpl.java:43)
	at com.atlassian.jira.plugin.webfragment.model.VersionHelper.(VersionHelper.java:17)
	at _jsp._secure._views._browser._browseversion__jsp._jspService(_browseversion__jsp.java:272)
	at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
        ...


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Anton Mazkovoi [Atlassian] added a comment - 31/Jul/07 03:18 AM
Can we ensure we also test for the case that the version id is specified as a string and not a number? And the same set of tests for the Browse Component page.

Brad Baker [Atlassian] added a comment - 16/Aug/07 06:21 PM
Fixed