@NonNls inspection question

Hi all,

It seems that @NonNls is ignored by the 'String.equals() using internationalised strings' inspection. Is this correct? It seems like marking the two strings as @NonNls should prevent this warning.

Is there a list of the rules that @NonNls follows somewhere?

Cheers,
Colin

5 comments

I am guessing you are using the milestone? In the latest EAP build the internationalization inspections should respect the @NonNls annotation better. See http://www.jetbrains.net/jira/browse/IDEADEV-12601
If you find any cases where it still is not working like you expect, let me know.

Bas

0

Ah, great, thanks! I'll have to brave the EAP waters again then.

Cheers,
Colin

0

Hi Bas,

It would be useful to have the option to disable the "duplicate string literal" inspection for fields marked with the @PropertyKey annotation. I'm working on a large app that uses OSGi, we need separate localisation for each OSGi bundle and frequently the keys are the same (file.not.found, for example). I don't want to turn the inspection off entirely because it's useful in general.

Cheers,
Colin

0

Please post the issue to the jira, since it is IDEA' own inspection.

--
regards,
--
Alexey Kudravtsev
Software Developer
JetBrains, Inc, http://www.jetbrains.com
"Develop with pleasure!"

"Colin Fleming" <no_reply@jetbrains.com> wrote in message
news:20967725.1177690168929.JavaMail.itn@is.intellij.net...

Hi Bas,

>

It would be useful to have the option to disable the "duplicate string
literal" inspection for fields marked with the @PropertyKey annotation.
I'm working on a large app that uses OSGi, we need separate localisation
for each OSGi bundle and frequently the keys are the same (file.not.found,
for example). I don't want to turn the inspection off entirely because
it's useful in general.

>

Cheers,
Colin



0

Please sign in to leave a comment.