Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333833 - Session2xInterfacesTable produces different byte codes with new compiler due to unused variables.
Summary: Session2xInterfacesTable produces different byte codes with new compiler due ...
Status: RESOLVED FIXED
Alias: None
Product: WTP EJB Tools
Classification: WebTools
Component: jst.ejb (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.2.3   Edit
Assignee: Kaloyan Raev CLA
QA Contact: Kaloyan Raev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 333678
  Show dependency tree
 
Reported: 2011-01-10 01:46 EST by David Williams CLA
Modified: 2011-01-12 13:44 EST (History)
0 users

See Also:


Attachments
suggested fix (2.32 KB, patch)
2011-01-10 01:46 EST, David Williams CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.