Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 190208 - [quick fix] correct type for for-each-loop variable based on array element type
Summary: [quick fix] correct type for for-each-loop variable based on array element type
Status: RESOLVED DUPLICATE of bug 221767
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL: http://www.tutego.com/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-31 09:16 EDT by Christian Ullenboom CLA
Modified: 2008-03-17 20:37 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 Christian Ullenboom CLA 2007-05-31 09:16:32 EDT
The quick-fix should propose the correct type for an enhanced-for-loop variable based on the type array.

for ( String p : Security.getProviders() )

->

for (Provider p : Security.getProviders() )

The quick fix should not underline “Security.getProviders()” but “String p” and should offer [Provider, …, Object] as valid types for the local variable.

 Christian
Comment 1 Martin Aeschlimann CLA 2008-03-17 20:37:37 EDT

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