Bug 151153 - [1.6][compiler] Invalid Stackmap attribute generated for ternary operator
Summary: [1.6][compiler] Invalid Stackmap attribute generated for ternary operator
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-19 18:31 EDT by Doug Simon CLA
Modified: 2006-09-12 04:42 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 Doug Simon CLA 2006-07-19 18:31:37 EDT
The eclipse compiler generates an invalid StackMap attribute for the 'make' method when compiling the following class:

------------------------------

import java.util.*;

public class MapMaker {
    public static Map make(boolean sorted) {
        return (sorted) ? new TreeMap() : new HashMap();
    }
    
    public static void main(String[] args) {
        System.out.println(make(false));
    }
}

----------------------------------

Trying to run this class causes a NoClassDefFoundError which is actually a result of a ClassFormatError.
Comment 1 Olivier Thomann CLA 2006-08-23 11:22:09 EDT
Added regression test org.eclipse.jdt.core.tests.compiler.regression.StackMapAttributeTest.test020.
Fixed and released in HEAD.
Comment 2 Olivier Thomann CLA 2006-08-23 11:28:29 EDT
Released for 3.2.1
Comment 3 David Audel CLA 2006-09-12 04:42:15 EDT
Verified for 3.2.1 using build M20060908-1655