You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Kirk Lund (JIRA)" <ji...@apache.org> on 2016/03/21 22:39:25 UTC

[jira] [Assigned] (GEODE-1116) Refactor FieldSerializationUtils to improve local variable names

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

Kirk Lund reassigned GEODE-1116:
--------------------------------

    Assignee: Kirk Lund

> 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
>
> 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)