Bug 392164 - NPE when opening a review in read only mode
Summary: NPE when opening a review in read only mode
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 0.11.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.12.0   Edit
Assignee: Alvaro Sanchez-Leon CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2012-10-17 09:20 EDT by Jacques Bouthillier CLA
Modified: 2012-10-22 10:48 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacques Bouthillier CLA 2012-10-17 09:20:32 EDT
When trying to open a review in read only mode, I got the following null pointer:
Group r4e_1.2.0
Review: 7105 Bug 346743: Support of in-line commenting

!ENTRY org.eclipse.core.jobs 4 2 2012-10-17 09:13:05.666
!MESSAGE An internal error occurred during: "Opening Element...".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.mylyn.reviews.r4e.ui.internal.model.R4EUIAnomalyContainer$1.compare(R4EUIAnomalyContainer.java:100)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.model.R4EUIAnomalyContainer$1.compare(R4EUIAnomalyContainer.java:1)
	at java.util.TimSort.countRunAndMakeAscending(Unknown Source)
	at java.util.TimSort.sort(Unknown Source)
	at java.util.TimSort.sort(Unknown Source)
	at java.util.Arrays.sort(Unknown Source)
	at java.util.Collections.sort(Unknown Source)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.model.R4EUIAnomalyContainer.addChildren(R4EUIAnomalyContainer.java:412)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.model.R4EUIAnomalyContainer.open(R4EUIAnomalyContainer.java:359)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.model.R4EUIReviewBasic.open(R4EUIReviewBasic.java:751)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.commands.handlers.OpenElementHandler$1.run(OpenElementHandler.java:100)
Comment 1 Alvaro Sanchez-Leon CLA 2012-10-22 10:48:00 EDT
Global anomalies don't have a position and will return a null for it.
the compare method captured in the stack was updated to compare anomalies with no position by the createdOn date.