Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-217 Update DUnit framework to JUnit 4
  3. GEODE-1116

Refactor FieldSerializationUtils to improve local variable names

Agile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to IssueLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0-incubating.M2
    • tests
    • None

    Description

      Make the following changes to fix names of local variables:

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

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            klund Kirk Lund
            klund Kirk Lund
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment