geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [geode] branch develop updated: GEODE-6688: prevent Integer allocation in InternalDistributedMember deserialization (#3514)
Date Tue, 30 Apr 2019 17:12:07 GMT
This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7fbb95c  GEODE-6688: prevent Integer allocation in InternalDistributedMember deserialization
(#3514)
7fbb95c is described below

commit 7fbb95c129f11a528bad02c7a2d5d8222f8e4ca2
Author: Darrel Schneider <dschneider@pivotal.io>
AuthorDate: Tue Apr 30 10:11:55 2019 -0700

    GEODE-6688: prevent Integer allocation in InternalDistributedMember deserialization (#3514)
    
    InternalDistributedMember now uses readInt instead of readInteger
    to prevent an Integer instance creation.
---
 .../org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt   | 4 ++--
 .../distributed/internal/membership/InternalDistributedMember.java  | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
b/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
index 3e32e0e..923e751 100644
--- a/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
+++ b/geode-core/src/integrationTest/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
@@ -272,8 +272,8 @@ toData,16
 
 org/apache/geode/distributed/internal/membership/InternalDistributedMember,6
 fromData,38
-fromDataPre_GFE_7_1_0_0,282
-fromDataPre_GFE_9_0_0_0,282
+fromDataPre_GFE_7_1_0_0,281
+fromDataPre_GFE_9_0_0_0,281
 toData,34
 toDataPre_GFE_7_1_0_0,271
 toDataPre_GFE_9_0_0_0,266
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
index b5157f8..3fd95f4 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
@@ -858,7 +858,7 @@ public class InternalDistributedMember implements DistributedMember, Externaliza
     String name = DataSerializer.readString(in);
     this.uniqueTag = DataSerializer.readString(in);
     String durableId = DataSerializer.readString(in);
-    int durableTimeout = DataSerializer.readInteger(in).intValue();
+    int durableTimeout = in.readInt();
     DurableClientAttributes durableClientAttributes =
         new DurableClientAttributes(durableId, durableTimeout);
 
@@ -1028,7 +1028,7 @@ public class InternalDistributedMember implements DistributedMember,
Externaliza
     }
 
     String durableId = DataSerializer.readString(in);
-    int durableTimeout = DataSerializer.readInteger(in).intValue();
+    int durableTimeout = in.readInt();
     DurableClientAttributes durableClientAttributes =
         durableId.length() > 0 ? new DurableClientAttributes(durableId, durableTimeout)
: null;
 
@@ -1073,7 +1073,7 @@ public class InternalDistributedMember implements DistributedMember,
Externaliza
     }
 
     String durableId = DataSerializer.readString(in);
-    int durableTimeout = DataSerializer.readInteger(in).intValue();
+    int durableTimeout = in.readInt();
     DurableClientAttributes durableClientAttributes =
         durableId.length() > 0 ? new DurableClientAttributes(durableId, durableTimeout)
: null;
 


Mime
View raw message