Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353725

Summary: [generalize type] Should not suggest 'Object' inside try-with-resources
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Deepak Azad <deepakazad>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: deepakazad
Version: 3.7.1Keywords: bugday
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Dani Megert CLA 2011-08-03 05:36:07 EDT
I20110729-1200 and M20110729-1400.

[generalize type] Should not suggest 'Object' inside try-with-resources

1. paste this into Package Explorer:
import java.io.FileInputStream;
import java.io.IOException;

class Test {
	public static void main(String[] args) throws IOException {
		try (FileInputStream fis = null) {
		}
	}
}

2. select 'fis'
3. Generalize type to 'Object'
==> compile error.
Comment 1 Eclipse Genie CLA 2020-02-07 08:18:25 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.