From 5abf8a14a228f963e4f36023ebe10f681b7d2fd7 Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Thu, 7 Mar 2019 11:53:17 +0100 Subject: [PATCH] IG: add problem examples to the description --- .../inspectionDescriptions/StringToUpperWithoutLocale.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/StringToUpperWithoutLocale.html b/plugins/InspectionGadgets/src/inspectionDescriptions/StringToUpperWithoutLocale.html index 9b9cac6a0829..afe23e4cb43c 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/StringToUpperWithoutLocale.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/StringToUpperWithoutLocale.html @@ -3,7 +3,12 @@ Reports any call of toUpperCase() or toLowerCase() on String objects which do not specify a java.util.Locale. -Such calls are usually incorrect in an internationalized environment. +In these cases the default locale of the system is used, which can cause problems in an internationalized environment. +

+For example the code "i".toUpperCase().equals("I") returns false in the Turkish and Azerbaijani locales, +where the dotted and dotless 'i' are separate letters. +Calling toUpperCase() on an English string containing an 'i', when running on a Turkish system, will return incorrect results. +Alternatively when dealing with strings that should be treated locale independently, like HTML tags, this can lead to errors.