Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359438 - [Compatibility] Substantial chunk of dead code in ModeledPageLayout.insert(MUIElement, MUIElement, int, int)
Summary: [Compatibility] Substantial chunk of dead code in ModeledPageLayout.insert(MU...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.2 M3   Edit
Assignee: Dean Roberts CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 11:25 EDT by Dean Roberts CLA
Modified: 2011-10-26 14:00 EDT (History)
1 user (show)

See Also:


Attachments
Remove dead code (2.62 KB, patch)
2011-10-17 10:05 EDT, Dean Roberts CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Roberts CLA 2011-09-29 11:25:01 EDT
There is a compiler warning about dead code in this method, and some static analysis with Remy proves that there is actually a substantial amount of code that imperically could never be running ... and if it did would be throwing NPEs

It would probably be a good idea to delete the code or understand what the original intent was.

The code in the method starts with boolean isStack = true and everything below it.
Comment 1 Dean Roberts CLA 2011-10-17 10:05:45 EDT
Created attachment 205327 [details]
Remove dead code

This file is also touched by the 2nd patch for bug 355497 which is not released yet.

That patch would need to be applied before this one so the line numbers work out ... although no functionality from 355497 is required.
Comment 2 Remy Suen CLA 2011-10-18 14:22:14 EDT
(In reply to comment #1)
> Created attachment 205327 [details]
> Remove dead code

Patch released to R4_development. Thanks, Dean!
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=eacc2d2c4501038aa97acab5f7c97c181089d055
Comment 3 Dean Roberts CLA 2011-10-26 14:00:51 EDT
Verified on I20111014-1625