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

Bug 359438

Summary: [Compatibility] Substantial chunk of dead code in ModeledPageLayout.insert(MUIElement, MUIElement, int, int)
Product: [Eclipse Project] Platform Reporter: Dean Roberts <dean.t.roberts>
Component: UIAssignee: Dean Roberts <dean.t.roberts>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: remy.suen
Version: 4.2   
Target Milestone: 4.2 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Remove dead code none

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