Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362531 - BrowserFormPage.getBrowser throws NPE if not yet initialized
Summary: BrowserFormPage.getBrowser throws NPE if not yet initialized
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.6.4   Edit
Assignee: Thomas Ehrnhoefer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2011-10-31 17:08 EDT by Thomas Ehrnhoefer CLA
Modified: 2011-11-06 10:36 EST (History)
1 user (show)

See Also:


Attachments
patchv1 (492 bytes, patch)
2011-11-06 10:02 EST, Thomas Ehrnhoefer CLA
steffen.pingel: iplog+
Details | Diff
mylyn/context/zip (8.00 KB, application/octet-stream)
2011-11-06 10:02 EST, Thomas Ehrnhoefer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.