You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gn...@apache.org on 2017/10/03 09:50:26 UTC
svn commit: r1810824 -
/felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Reflective.java
Author: gnodet
Date: Tue Oct 3 09:50:26 2017
New Revision: 1810824
URL: http://svn.apache.org/viewvc?rev=1810824&view=rev
Log:
Use english locale to convert method names
Modified:
felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Reflective.java
Modified: felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Reflective.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Reflective.java?rev=1810824&r1=1810823&r2=1810824&view=diff
==============================================================================
--- felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Reflective.java (original)
+++ felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Reflective.java Tue Oct 3 09:50:26 2017
@@ -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))
{