Bug 98086 - [1.5][dom] CU still have problems even with @SuppressWarnings("all")
Summary: [1.5][dom] CU still have problems even with @SuppressWarnings("all")
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-02 08:03 EDT by Frederic Fusier CLA
Modified: 2005-06-10 09:59 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 Frederic Fusier CLA 2005-06-02 08:03:01 EDT
Using 3.1 RC1.

Here's following code snippet:
import java.util.ArrayList;
import java.util.List;
@SuppressWarnings("unchecked")
public class Test {
	List<String> ls = new ArrayList();
}

There's no compiler warning neither in editor nor in problems view. However,
looking at ASTView, I see 1 compiler problem:
"Type safety: The expression of type ArrayList needs unchecked conversion..."

I would expect same result than in editor, ie. no compiler error.
Comment 1 Frederic Fusier CLA 2005-06-02 09:09:27 EDT
Note that seems to be the case whatever token is used ("boxing", "unusedLocal",
"unusedPrivate", etc.).
Comment 2 Philipe Mulet CLA 2005-06-02 10:52:11 EDT
+1 for RC2
Comment 3 Olivier Thomann CLA 2005-06-02 11:06:08 EDT
I believe the filtering of warnings is done too late.
I am investigating.
Comment 4 Olivier Thomann CLA 2005-06-02 11:34:45 EDT
Cannot reproduce.
I will release regression test
org.eclipse.jdt.core.tests.dom.ASTConverter15Test.test0185.
Let me know if you find anything wrong with my test.

Commenting out the @SuppressWarnings line reports a warning as expected.
Comment 5 Olivier Thomann CLA 2005-06-02 12:19:24 EDT
Only happens if the reconcile mode is not used.
Comment 6 Olivier Thomann CLA 2005-06-02 12:49:59 EDT
Fixed and released in HEAD.
Regression test added in ASTConverter15Test.test0185/0186.
Comment 7 Frederic Fusier CLA 2005-06-07 12:19:12 EDT
Verified for 3.1 RC2 using build N20050607-0010 + JDT/Core HEAD
Comment 8 David Audel CLA 2005-06-10 09:59:52 EDT
Verified for 3.1 RC2 using build I20050610-0010