geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kirk Lund (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GEODE-1116) Refactor FieldSerializationUtils to improve local variable names
Date Mon, 21 Mar 2016 21:40:25 GMT

     [ https://issues.apache.org/jira/browse/GEODE-1116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kirk Lund resolved GEODE-1116.
------------------------------
       Resolution: Fixed
    Fix Version/s: 1.0.0-incubating.M2

> Refactor FieldSerializationUtils to improve local variable names
> ----------------------------------------------------------------
>
>                 Key: GEODE-1116
>                 URL: https://issues.apache.org/jira/browse/GEODE-1116
>             Project: Geode
>          Issue Type: Sub-task
>          Components: tests
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>             Fix For: 1.0.0-incubating.M2
>
>
> Make the following changes to fix names of local variables:
> {noformat}
> diff --git a/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/rules/serializable/FieldSerializationUtils.java
b/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/rules/serializable/FieldSerializationUtils.java
> index 97e9265..101b6dd 100755
> --- a/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/rules/serializable/FieldSerializationUtils.java
> +++ b/geode-junit/src/main/java/com/gemstone/gemfire/test/junit/rules/serializable/FieldSerializationUtils.java
> @@ -28,9 +28,9 @@ public class FieldSerializationUtils {
>  
>    public static Object readField(final Class targetClass, final Object targetInstance,
final String fieldName) {
>      try {
> -      Field assureDeletionField = targetClass.getDeclaredField(fieldName);
> -      assureDeletionField.setAccessible(true);
> -      return assureDeletionField.get(targetInstance);
> +      Field field = targetClass.getDeclaredField(fieldName);
> +      field.setAccessible(true);
> +      return field.get(targetInstance);
>      } catch (IllegalAccessException | NoSuchFieldException e) {
>        throw new Error(e);
>      }
> @@ -38,9 +38,9 @@ public class FieldSerializationUtils {
>  
>    public static void writeField(final Class targetClass, final Object targetInstance,
final String fieldName, final Object value) {
>      try {
> -      Field folderField = targetClass.getDeclaredField(fieldName);
> -      folderField.setAccessible(true);
> -      folderField.set(targetInstance, value);
> +      Field field = targetClass.getDeclaredField(fieldName);
> +      field.setAccessible(true);
> +      field.set(targetInstance, value);
>      } catch (IllegalAccessException | NoSuchFieldException e) {
>        throw new Error(e);
>      }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message