Bug 110613 - [1.5][compiler] Should not report warnings for nls string inside annotation declaration
Summary: [1.5][compiler] Should not report warnings for nls string inside annotation d...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-26 11:20 EDT by Olivier Thomann CLA
Modified: 2005-10-31 06:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2005-09-26 11:20:12 EDT
From bug 97220, the detection of nls warnings should not be done within
annotation declarations.
import java.lang.annotation.*;

@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD,
         ElementType.PARAMETER, ElementType.CONSTRUCTOR,
         ElementType.LOCAL_VARIABLE, ElementType.PACKAGE})
@Retention(RetentionPolicy.CLASS)
public @interface MySuppressWarnings
{
    String[] value() default {};
    String justification() default "";
}

The default value for justification should not be tagged as non-nls string.
Comment 1 Olivier Thomann CLA 2005-09-30 09:08:50 EDT
We should consider only the range of each annotation type member declaration.
Comment 2 Olivier Thomann CLA 2005-10-13 15:14:42 EDT
Fixed and released in HEAD.
Regression test in
org.eclipse.jdt.core.tests.compiler.regression.ExternalizeStringLiterals15Test.test001
Comment 3 David Audel CLA 2005-10-31 06:16:19 EST
Verified for 3.2 M3 using build I20051031-0010