Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333833

Summary: Session2xInterfacesTable produces different byte codes with new compiler due to unused variables.
Product: [WebTools] WTP EJB Tools Reporter: David Williams <david_williams>
Component: jst.ejbAssignee: Kaloyan Raev <kaloyan>
Status: RESOLVED FIXED QA Contact: Kaloyan Raev <kaloyan>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 333678    
Attachments:
Description Flags
suggested fix none

Description David Williams CLA 2011-01-10 01:46:15 EST
Created attachment 186357 [details]
suggested fix

similar to other bugs related to bug 333678 ... 

This case is a little complicated, since the only one detected as unused by compiler is 'width' but if assuming none of the "table.getWidth()" type of method have side effects, there's a whole chunk of code that's not needed. 

This might be a case where the "unused variable" is really detecting a problem in the code logic? Hard for me to tell. But in my suggested fix, I've just removed all the seemingly unused code.
Comment 1 Kaloyan Raev CLA 2011-01-12 12:34:20 EST
David, this was actually an unnecessary code. I removed it and committed the change into HEAD. 

Let me know if it is also needed for 3.2.3.
Comment 2 David Williams CLA 2011-01-12 13:07:54 EST
I would prefer it in 3.2.3. We might not change the compiler in the 3.2.3 stream (normally we would not, and, surely will not right now) ... but, if 3.2.x turns out to be a long term maintenance stream then we might eventually also want to change the compiler, so then we would go through all this over again ... or, you can wait until it actually shows up? Up to you ... depending on ease/safety, etc. 

Thanks for handling.
Comment 3 Kaloyan Raev CLA 2011-01-12 13:44:21 EST
Thanks for the clarification, David. I committed the change also in the 3.2.3 branch.