nabarunnag commented on a change in pull request #6500:
URL: https://github.com/apache/geode/pull/6500#discussion_r658951038



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/TXCommitMessage.java
##########
@@ -1384,153 +1323,145 @@ protected void 
txApplyEntryOpAdjunctOnly(FarSideEntryOp entryOp) {
          */
         @Released
         EntryEventImpl eei =
-            txCallbackEventFactory.createCallbackEvent(this.internalRegion, 
entryOp.op,
+            txCallbackEventFactory.createCallbackEvent(internalRegion, 
entryOp.op,
                 entryOp.key,
-                entryOp.value, this.msg.txIdent, txEvent, getEventId(entryOp), 
entryOp.callbackArg,
-                entryOp.filterRoutingInfo, this.msg.bridgeContext, null, 
entryOp.versionTag,
+                entryOp.value, msg.txIdent, txEvent, getEventId(entryOp), 
entryOp.callbackArg,
+                entryOp.filterRoutingInfo, msg.bridgeContext, null, 
entryOp.versionTag,
                 entryOp.tailKey);
         try {
           if (entryOp.filterRoutingInfo != null) {
             eei.setLocalFilterInfo(
-                
entryOp.filterRoutingInfo.getFilterInfo(this.internalRegion.getCache().getMyId()));
+                
entryOp.filterRoutingInfo.getFilterInfo(internalRegion.getCache().getMyId()));
           }
           if (isDuplicate) {
             eei.setPossibleDuplicate(true);
           }
           if (logger.isDebugEnabled()) {
             logger.debug("invoking transactional callbacks for {} key={} 
needsUnlock={} event={}",
-                entryOp.op, entryOp.key, this.needsUnlock, eei);
+                entryOp.op, entryOp.key, needsUnlock, eei);
           }
           // we reach this spot because the event is either delivered to this 
member
           // as an "adjunct" message or because the bucket was being created 
when
           // the message was sent and already reflects the change caused by 
this event.
           // In the latter case we need to invoke listeners
           final boolean skipListeners = !isDuplicate;
-          eei.invokeCallbacks(this.internalRegion, skipListeners, true);
+          eei.invokeCallbacks(internalRegion, skipListeners, true);
         } finally {
           eei.release();
         }
-        return;
       }
     }
 
     boolean isEmpty() {
-      return this.opKeys == null;
+      return opKeys == null;
     }
 
     boolean needsAck() {
-      return this.internalRegion.getScope().isDistributedAck();
+      return internalRegion.getScope().isDistributedAck();
     }
 
     void addOp(Object key, TXEntryState entry) {
-      if (this.opKeys == null) {
-        this.opKeys = new ArrayList(this.maxSize);
-        this.opEntries = new ArrayList(this.maxSize);
+      if (opKeys == null) {
+        opKeys = new ArrayList<>(maxSize);
+        opEntries = new ArrayList<>(maxSize);
       }
-      this.opKeys.add(key);
-      this.opEntries.add(entry);
+      opKeys.add(key);
+      opEntries.add(entry);
     }
 
 
     public boolean isForceFireEvent(DistributionManager dm) {
       LocalRegion r = getRegionByPath(dm, regionPath);
-      if (r instanceof PartitionedRegion || (r != null && 
r.isUsedForPartitionedRegionBucket())) {
-        return false;
-      }
-      return true;
+      return !(r instanceof PartitionedRegion) && (r == null || !r
+          .isUsedForPartitionedRegionBucket());
     }
 
     public void fromData(DataInput in, boolean hasShadowKey)
         throws IOException, ClassNotFoundException {
-      this.regionPath = DataSerializer.readString(in);
-      this.parentRegionPath = DataSerializer.readString(in);
+      regionPath = DataSerializer.readString(in);
+      parentRegionPath = DataSerializer.readString(in);
 
       int size = in.readInt();
       if (size > 0) {
-        this.opKeys = new ArrayList(size);
-        this.opEntries = new ArrayList(size);
+        opKeys = new ArrayList<>(size);
+        opEntries = new ArrayList<>(size);
         final boolean largeModCount = in.readBoolean();
-        this.memberId = DataSerializer.readObject(in);
+        memberId = DataSerializer.readObject(in);
         for (int i = 0; i < size; i++) {
           FarSideEntryOp entryOp = new FarSideEntryOp();
           // shadowkey is not being sent to clients
           entryOp.fromData(in, largeModCount, hasShadowKey);
-          if (entryOp.versionTag != null && this.memberId != null) {
-            entryOp.versionTag.setMemberID(this.memberId);
+          if (entryOp.versionTag != null && memberId != null) {
+            entryOp.versionTag.setMemberID(memberId);
           }
-          this.msg.addFarSideEntryOp(entryOp);
-          this.opKeys.add(entryOp.key);
-          this.opEntries.add(entryOp);
+          msg.addFarSideEntryOp(entryOp);
+          opKeys.add(entryOp.key);
+          opEntries.add(entryOp);
         }
       }
     }
 
     @Override
     public String toString() {
       StringBuilder result = new StringBuilder(64);
-      if (this.regionPath != null) {
-        result.append(this.regionPath);
+      if (regionPath != null) {
+        result.append(regionPath);
       } else {
-        result.append(this.internalRegion.getFullPath());
+        result.append(internalRegion.getFullPath());
       }
-      if (this.refCount > 0) {
-        result.append(" refCount=").append(this.refCount);
+      if (refCount > 0) {
+        result.append(" refCount=").append(refCount);
       }
       return result.toString();
     }
 
     private void basicToData(DataOutput out,
         SerializationContext context,
         boolean useShadowKey) throws IOException {
-      if (this.internalRegion != null) {
-        DataSerializer.writeString(this.internalRegion.getFullPath(), out);
-        if (this.internalRegion instanceof BucketRegion) {
+      if (internalRegion != null) {
+        DataSerializer.writeString(internalRegion.getFullPath(), out);
+        if (internalRegion instanceof BucketRegion) {
           DataSerializer.writeString(
-              ((Bucket) 
this.internalRegion).getPartitionedRegion().getFullPath(), out);
+              ((Bucket) internalRegion).getPartitionedRegion().getFullPath(), 
out);
         } else {
           DataSerializer.writeString(null, out);
         }
       } else {
-        DataSerializer.writeString(this.regionPath, out);
-        DataSerializer.writeString(this.parentRegionPath, out);
+        DataSerializer.writeString(regionPath, out);
+        DataSerializer.writeString(parentRegionPath, out);
       }
 
-      if (isEmpty() || this.opKeys.size() == 0) {
+      if (isEmpty() || opKeys.size() == 0) {
         out.writeInt(0);
       } else {
-        int size = this.opKeys.size();
+        int size = opKeys.size();
         out.writeInt(size);
 
         final boolean largeModCount;
-        if (this.msg.txState != null) {
-          largeModCount = this.msg.txState.needsLargeModCount();
+        if (msg.txState != null) {
+          largeModCount = msg.txState.needsLargeModCount();
         } else {
-          largeModCount = this.msg.needsLargeModCount;
+          largeModCount = msg.needsLargeModCount;
         }
         out.writeBoolean(largeModCount);
 
-        final boolean sendVersionTags =
-            this.msg.clientVersion == null
-                || KnownVersion.GFE_70.compareTo(this.msg.clientVersion) <= 0;
-        if (sendVersionTags) {
-          VersionSource member = this.memberId;
-          if (member == null) {
-            if (this.internalRegion == null) {
-              Assert.assertTrue(this.msg.txState == null);
-            } else {
-              member = this.internalRegion.getVersionMember();
-            }
+        VersionSource member = memberId;

Review comment:
       Thank you for the explanation 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to