Community
Participate
Working Groups
Using 3.1 RC1. Identifiers called "assert" are flagged as warning only in 1.3 or 1.4 source levels and annotations cannot be used at these source levels. At 1.5 source level such identifiers are flagged as error and so cannot be suppressed using SuppressWarnings annotation...
It should be handled specifically for @SuppressWarnings. It need to remain found as an irritant for rest of problem reporting to function properly. +1 for RC2
So you mean that you want to remove the support for "assert" inside the @SuppressWarnings support.
"assert" should indeed be removed from the list of valid tokens for @SuppressWarnings as this has to be an error in 1.5 code. Therefore it can never be flagged as a warning.
Created attachment 22319 [details] Apply on HEAD Proposed patch
Fixed and released in HEAD. Regression test added in org.eclipse.jdt.core.tests.model.CodeCorrectionTests.testWarningAssert.
Also added regression test in org.eclipse.jdt.core.tests.compiler.regression.AnnotationTest.test150
Verified for 3.1 RC2 using build N20050607-0010 + JDT/Core HEAD
Verified for 3.1 RC2 using build I20050610-0010