Skip to content

Commit 9a99e3d

Browse files
elharosduskis
authored andcommitted
avoid default locale (#617)
1 parent 2f12c85 commit 9a99e3d

File tree

1 file changed

+6
-6
lines changed
  • google-http-client/src/main/java/com/google/api/client/util

1 file changed

+6
-6
lines changed

google-http-client/src/main/java/com/google/api/client/util/FieldInfo.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public static FieldInfo of(Field field) {
144144
private Method[] settersMethodForField(Field field) {
145145
List<Method> methods = new ArrayList<>();
146146
for (Method method : field.getDeclaringClass().getDeclaredMethods()) {
147-
if (Ascii.toLowerCase(method.getName()).equals("set" + field.getName().toLowerCase())
147+
if (Ascii.toLowerCase(method.getName()).equals("set" + Ascii.toLowerCase(field.getName()))
148148
&& method.getParameterTypes().length == 1) {
149149
methods.add(method);
150150
}
@@ -221,9 +221,9 @@ public Object getValue(Object obj) {
221221
}
222222

223223
/**
224-
* Sets to the given value of the field in the given object instance using reflection.
224+
* Sets this field in the given object to the given value using reflection.
225225
* <p>
226-
* If the field is final, it checks that value being set is identical to the existing value.
226+
* If the field is final, it checks that the value being set is identical to the existing value.
227227
*/
228228
public void setValue(Object obj, Object value) {
229229
if (setters.length > 0) {
@@ -252,7 +252,7 @@ public <T extends Enum<T>> T enumValue() {
252252
}
253253

254254
/**
255-
* Returns the value of the given field in the given object instance using reflection.
255+
* Returns the value of the given field in the given object using reflection.
256256
*/
257257
public static Object getFieldValue(Field field, Object obj) {
258258
try {
@@ -263,9 +263,9 @@ public static Object getFieldValue(Field field, Object obj) {
263263
}
264264

265265
/**
266-
* Sets to the given value of the given field in the given object instance using reflection.
266+
* Sets the given field in the given object to the given value using reflection.
267267
* <p>
268-
* If the field is final, it checks that value being set is identical to the existing value.
268+
* If the field is final, it checks that the value being set is identical to the existing value.
269269
*/
270270
public static void setFieldValue(Field field, Object obj, Object value) {
271271
if (Modifier.isFinal(field.getModifiers())) {

0 commit comments

Comments
 (0)