Use english locale to convert method names
@@ -27,6 +27,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -57,7 +58,7 @@ public final class Reflective
List<Object> args) throws Exception
{
Method[] methods = target.getClass().getMethods();
- name = name.toLowerCase();
+ name = name.toLowerCase(Locale.ENGLISH);
String org = name;
String get = "get" + name;
@@ -74,7 +75,7 @@ public final class Reflective
Method[] staticMethods = ((Class<?>) target).getMethods();
for (Method m : staticMethods)
{
- String mname = m.getName().toLowerCase();
+ String mname = m.getName().toLowerCase(Locale.ENGLISH);
if (mname.equals(name) || mname.equals(get) || mname.equals(set)
|| mname.equals(is) || mname.equals(MAIN))
{
@@ -91,7 +92,7 @@ public final class Reflective
for (Method m : methods)
{
- String mname = m.getName().toLowerCase();
+ String mname = m.getName().toLowerCase(Locale.ENGLISH);
if (mname.equals(name) || mname.equals(get) || mname.equals(set)
|| mname.equals(is) || mname.equals(MAIN))
{
