| Summary: | Null Pointer Exception when Importing UtilityJar | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Java EE Tools | Reporter: | Scott Huff <shuff> | ||||||
| Component: | jst.j2ee | Assignee: | Scott Huff <shuff> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ccc, david_williams, jsholl, neil.hauge | ||||||
| Version: | 3.2 | Flags: | david_williams:
pmc_approved+
cbridgha: pmc_approved? (raghunathan.srinivasan) cbridgha: pmc_approved? (naci.dai) cbridgha: pmc_approved? (deboer) neil.hauge: pmc_approved+ cbridgha: pmc_approved? (kaloyan) cbridgha: review+ ccc: review+ |
||||||
| Target Milestone: | 3.2.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | PMC_approved | ||||||||
| Attachments: |
|
||||||||
Scott can you explain in this snippet why we notify in different order(before, then after property set) for each branch?
if(model.getBooleanProperty(OVERRIDE_PROJECT_ROOT)){
model.notifyPropertyChange(PROJECT_ROOT, IDataModel.VALUE_CHG);
model.setProperty(PROJECT_ROOT, lastUserPath);
}else{
lastUserPath = model.getStringProperty(PROJECT_ROOT);
model.setProperty(PROJECT_ROOT, getDefaultProperty(PROJECT_ROOT));
model.notifyPropertyChange(PROJECT_ROOT, IDataModel.VALUE_CHG);
}
Created attachment 174400 [details]
replacement patch
Same patch, but making sure we notify after setting property
Approve Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. Exceptions thrown invalid path entered - no validation is done prior to operation running Is there a work-around? If so, why do you believe the work-around is insufficient? No - exception will be thrown How has the fix been tested? scenario testing Give a brief technical overview. Who has reviewed this fix? The case where this is failing.. a bad path is entered in the "override project root" field. The validation was not done after setting the property - notification wasn't done to activate validation Carl and myself reviewed the patch What is the risk associated with this fix? Low risk - validation now runs on settings I approve of this fix. Committed to HEAD for WTP 3.2.1 and WTP 3.3 Please note that the changes for bug 319918 were also (erroneously) committed with the comment for this bug- if you are looking for the bug related to changes to FlatComponentDeployable or J2EEFlexProjDeployable.java, please see bug 319918 |
Created attachment 174364 [details] Patch file alters J2EEUtilityJarListImportDataModelProvider.java Patch resolves the error by checking user entered path text with the same validation that is checked when the wizard is finished at entry and returning exceptions when they occur. Bug traced to not checking the path validation before the user finishes the wizard. Steps to reproduce Bug: 1.- Create an EAR project 2.- Import an Utility jar to this project using contex menu: Import > Java EE Utility JAR, Select the import type as: "Create Java projects from utility JARs", check the "Override project root" option, leave the default location. Next. 3.- Browse for the JAR directory, select the JAR file, and Finish. At this point the following exception is throw: