Windows Turkish false Typo problem (IDEA-167105)

This commit is contained in:
Maxim.Mossienko
2017-01-26 17:30:57 +01:00
parent 1153ea1fd6
commit 8351f915aa
3 changed files with 21 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ import com.intellij.util.containers.hash.HashSet;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.Locale;
import java.util.Set;
@SuppressWarnings({"ALL"})
@@ -26,10 +27,13 @@ public class Transformation {
@Nullable
public String transform(@Nullable String word) {
if (word == null || word.trim().length() < 3) {
if (word == null) return null;
word = word.trim();
if (word.length() < 3) {
return null;
}
return word.trim().toLowerCase();
return word.toLowerCase(Locale.ENGLISH);
}
@Nullable

View File

@@ -0,0 +1,3 @@
class Foo {
int myInventory;
}

View File

@@ -15,6 +15,8 @@
*/
package com.intellij.spellchecker.inspection;
import java.util.Locale;
/**
* @author Ekaterina Shliakhovetskaja
*/
@@ -28,6 +30,16 @@ public class CommentsWithMistakesInspectionTest extends SpellcheckerInspectionTe
doTest("SPITest1.java");
}
public void testJavaWithTurkishLocale() {
Locale locale = Locale.getDefault();
try {
Locale.setDefault(new Locale("tr", "TR"));
doTest("SPITest2.java");
} finally {
Locale.setDefault(locale);
}
}
public void testXml() {
doTest("A.xml");
}