Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362531

Summary: BrowserFormPage.getBrowser throws NPE if not yet initialized
Product: z_Archived Reporter: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Component: MylynAssignee: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: steffen.pingel
Version: unspecifiedKeywords: contributed
Target Milestone: 3.6.4   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patchv1
steffen.pingel: iplog+
mylyn/context/zip none

Description Thomas Ehrnhoefer CLA 2011-10-31 17:08:24 EDT
the browserViewer field might not be initialized (formContent not yet created or failed), but getBrowser() doesn't check for that.
Comment 1 Thomas Ehrnhoefer CLA 2011-10-31 17:27:48 EDT
pushed a patch to gerrit, but build fails, not sure, but it's such a simple fix, I don't want to waste time investigating. Surely my change doesn't break the build, but me using git/gerrit wrong.

The proposed change is:

bc.. public Browser getBrowser() {
		if (browserViewer == null) {
			return null;
		}
		return browserViewer.getBrowser();
}
Comment 2 Steffen Pingel CLA 2011-10-31 18:16:04 EDT
Thanks. Can you please attach a patch with your fix?
Comment 3 Thomas Ehrnhoefer CLA 2011-11-01 09:26:59 EDT
Didn't you approve the review and merged the changes already?
http://review.mylyn.org/#change,95
Why a patch?
Comment 4 Steffen Pingel CLA 2011-11-01 10:15:02 EDT
The Mylyn Gerrit instance is not part of Eclipse.org. I have updated the contributors guide to explain why we still need patches in order to  accept contributions in accordance with the Eclipse development process: http://wiki.eclipse.org/Mylyn/Contributor_Reference#Merging_Contributions . For simple changes you can always directly attach a patch without creating a code review if you prefer that.
Comment 5 Steffen Pingel CLA 2011-11-05 05:42:42 EDT
Would you be able to attach your changes as a patch?
Comment 6 Thomas Ehrnhoefer CLA 2011-11-06 10:02:54 EST
Created attachment 206498 [details]
patchv1
Comment 7 Thomas Ehrnhoefer CLA 2011-11-06 10:02:56 EST
Created attachment 206499 [details]
mylyn/context/zip
Comment 8 Steffen Pingel CLA 2011-11-06 10:36:31 EST
Great! Thanks. I have applied the patch to the e_3_7_m_3_6_x branch and master.