| Summary: | Avoid IllegalArgumentException in Validation filters | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Common Tools | Reporter: | Rosendo Martinez <rosendo> | ||||
| Component: | wst.validation | Assignee: | Rosendo Martinez <rosendo> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | ccc, shr31223 | ||||
| Version: | 3.3.1 | Flags: | cbridgha:
review+
|
||||
| Target Milestone: | 3.3.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Rosendo Martinez
Created attachment 209028 [details]
Proposed R3_3_maintenance patch
Rosendo - can you provide more details? I don't like to ignore exceptions unless we have a very clear reason. Sure, here they are: 1. Time ago there was a requirement to display not only the facet, project nature and content type ids, but also the names of those filter types in the Validation Filters dialog , see the Bug 302914. The main idea was to display the filter rules as following: Name - id 2. To get the name, the following APIs were used: ProjectFacetsManager.getProjectFacet(id) ResourcesPlugin.getWorkspace().getNatureDescriptor(String) RuntimeManager.getRuntime(id) Some of those meths throw an IllegalArgumentException exception when the id does not exist in the current workspace facets, so the name is not returned. 3. To avoid that exception, I am adding try/catch pairs. When the exception is thrown, the catch does not need to do something in particular since only the id will be displayed, with no name before it. Please, let me know any comment/question. ok I approve... if the runtime or facet is not recognized... we will handle nicely in this case. Code committed to R3_3_maintenance and HEAD for WTP 3.3.2 and 3.4. Resolving defect |