mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
Windows Turkish false Typo problem (IDEA-167105)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {
|
||||
int myInventory;
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user