Bug 110613

Summary: [1.5][compiler] Should not report warnings for nls string inside annotation declaration
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ndjc
Version: 3.2   
Target Milestone: 3.2 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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