Bug 57829 - Should optimize assert true case
Summary: Should optimize assert true case
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-07 18:08 EDT by Philipe Mulet CLA
Modified: 2004-05-18 10:09 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2004-04-07 18:08:45 EDT
Build 3.0M8

The following code should have its codegen optimized.
No need for the synthetic emulation for assertion support.

public class X {
    public static void main( String[] args ) {
        try {
            throw new Throwable( "This is a test");
        }
        catch( Throwable ioe ) {
            assert true : ioe;
        }
    }
}
Comment 1 Olivier Thomann CLA 2004-04-12 14:30:20 EDT
You mean that assert true : ...;  should be a no op?
This is trivial to add.
Comment 2 Olivier Thomann CLA 2004-04-12 16:46:17 EDT
Fixed and released in HEAD.
Where do you want the regression test to be added?
Comment 3 David Audel CLA 2004-05-18 10:09:52 EDT
Verified for 3.0M9