Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312490 - Unnecessary tracing errors
Summary: Unnecessary tracing errors
Status: RESOLVED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.2.2   Edit
Assignee: Angel Vera CLA
QA Contact: Angel Vera CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-11 15:29 EDT by Troy Bishop CLA
Modified: 2017-10-11 16:34 EDT (History)
1 user (show)

See Also:


Attachments
Possible patch (3.34 KB, patch)
2010-05-11 15:30 EDT, Troy Bishop CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Troy Bishop CLA 2010-05-11 15:29:53 EDT
Build Identifier: WTP 3.2

While tracing a publishing problem in a WTP adopter product I noticed a lot of tracing messages saying "Could not find <name> Reverting to default behaviour".  It turns out that this tracing message is happening because of binary JEE 5 modules.  If you have a binary JEE 5 module then it is not a project and therefore causes an IllegalArgumentException on the call to  getWorkspaceRoot().getProject(id);

I think a better way to handle this implementation would be to check the number of segments in the specified id.  If it is more than 1 then the id cannot be a project so the logic in ProjectModuleFactoryDelegate#findModule(String) should not be executed.  Only the call to super.findModule(id) should happen in this situation and no trace string should be printed since it's not an error situation.

Reproducible: Always
Comment 1 Troy Bishop CLA 2010-05-11 15:30:10 EDT
Created attachment 168009 [details]
Possible patch
Comment 2 Elson Yuen CLA 2010-08-23 14:54:57 EDT
The removal of the try catch block may cause a change in behaviour.  For example, the existing code used to catch some exceptions before the change, the new code will now causes an uncaught exception and throw to the downstream code.  Therefore, in order to avoid regression or change in behaviour in the existing API, we shouldn't remove the try catch blocks on the exceptions.
Comment 3 Angel Vera CLA 2010-08-23 15:15:13 EDT
Good point Elson. I am committing the code without the removal of the try/catch
Comment 4 Angel Vera CLA 2010-08-23 17:22:19 EDT
Changes committed and released to 32M and HEAD(3.3)
Comment 5 Angel Vera CLA 2010-08-24 14:16:45 EDT
Fixed.
Comment 6 Eclipse Genie CLA 2017-10-11 16:34:29 EDT
New Gerrit change created: https://git.eclipse.org/r/108982