Bug 176734 - [quick fix] add type parameters to method invocation
Summary: [quick fix] add type parameters to method invocation
Status: RESOLVED DUPLICATE of bug 174329
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-08 13:02 EST by Markus Keller CLA
Modified: 2007-03-22 06:19 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 Markus Keller CLA 2007-03-08 13:02:45 EST
From bug 174327:

We have no good quick fix for the situation below. 

import java.util.Collections;
import java.util.Map;
public class Try {
	void caller() {
		method(Collections.emptyMap()); //error on method
	}

	void method(Map<String, Integer> map) { }
}

The user probably meant:
		method(Collections.<String, Integer>emptyMap());

The compiler do the inference when Collections.emptyMap() is assigned to a variable (JLS3 15.12.2.8), but not when it is the actual argument of a method invocation.
Comment 1 Martin Aeschlimann CLA 2007-03-22 06:19:37 EDT

*** This bug has been marked as a duplicate of bug 174329 ***