Summary: | [ExternalTools] NPE in External Tool Builders property page when missing builder | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Unknown User <unknown> |
Component: | Ant | Assignee: | Ryan Cooper <ryan_cooper> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P1 | CC: | n.a.edgar, simon_arsenault |
Version: | 2.0 | Keywords: | ui |
Target Milestone: | 2.0 F4 | ||
Hardware: | PC | ||
OS: | other | ||
Whiteboard: |
Description
Unknown User
2002-06-14 18:18:27 EDT
Please investigate whether this should be a candidate for F4. Need value/risk assessment. Dave, what build are you using? What type of project did you open the properties on? In what view/perspective? Risk: low Value: high At BuilderPropertyPage line 395, we were calling IPluginRegistry.getExtension (String, String, String), which can potentially return null, but we were not checking for null. The fix is to check for null as shown below. The message which appears hard-coded below if null is returned should be stored in messages.properties for the real fix. // Get the human-readable name of the builder IExtension extension = Platform.getPluginRegistry().getExtension (ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PT_BUILDERS, builderID); String builderName; if (extension != null) builderName = extension.getLabel(); else builderName = "Could not find builder with id " + builderID; item.setText(builderName); item.setImage(builderImage); Please use "Missing builder (id={0})" instead. Ryan did the necessary code changes in BuilderPropertyPage and messages file. Checked by Tod and Simon |