Bug 177372 - [1.5][compiler] Missing unboxing conversion when no value required from message send
Summary: [1.5][compiler] Missing unboxing conversion when no value required from messa...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-14 12:50 EDT by Philipe Mulet CLA
Modified: 2007-03-20 09:53 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 2007-03-14 12:50:36 EDT
3.3m5

Following code should print "SUCCESS" after compiled, when unused locals are not preserved.
Basically, the unboxing conversion on message send return value (even if unused)
should still be generated.

class A<T> {
        public T foo() { return null; }
}

public class X {
        public static void main(String[] args) {
                A<Long> a = new A<Long>();
				 A ua = a;
                try {
	                long s = a.foo();
                } catch(NullPointerException e) {
                	System.out.println("SUCCESS");
                	return;
                }
            	System.out.println("FAILED");
        }
}
Comment 1 Philipe Mulet CLA 2007-03-14 12:57:18 EDT
Added AutoboxingTest#test135.
Patch appended into macro-patch in bug 177194
Comment 2 Philipe Mulet CLA 2007-03-15 08:00:27 EDT
Added AutoboxingTest#test136-test146.
Comment 3 Philipe Mulet CLA 2007-03-15 13:48:34 EDT
Released for 3.3M6

Backporting to 3.2 maintenance stream
Comment 4 Philipe Mulet CLA 2007-03-15 13:48:51 EDT
fixed
Comment 5 Olivier Thomann CLA 2007-03-20 09:53:31 EDT
Verified for 3.3 M6 using build I20070320-0010