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



##########
File path: 
geode-core/src/main/java/org/apache/geode/management/internal/configuration/domain/Configuration.java
##########
@@ -183,20 +185,48 @@ public void fromData(DataInput in) throws IOException, 
ClassNotFoundException {
     propertiesFileName = DataSerializer.readString(in);
     gemfireProperties = DataSerializer.readProperties(in);
     HashSet<String> jarNames = DataSerializer.readHashSet(in);
-    if (jarNames != null) {
-      // we are reading pre 1.12 data. So add each jar name to deployments
-      jarNames.stream()
-          .map(x -> new Deployment(x, null, null))
-          .forEach(deployment -> 
deployments.put(deployment.getDeploymentName(), deployment));
-    } else {
+    try {
       // version of the data we are reading (1.12 or later)
       final Version version = 
Versioning.getVersion(VersioningIO.readOrdinal(in));
       if (version.isNotOlderThan(KnownVersion.GEODE_1_12_0)) {
         deployments.putAll(DataSerializer.readHashMap(in));
       }
+    } catch (EOFException ex) {
+      if (jarNames != null) {
+        // we are reading pre 1.12 data. So add each jar name to deployments
+        jarNames.stream()
+            .map(x -> new Deployment(x, null, null))
+            .forEach(deployment -> 
deployments.put(deployment.getDeploymentName(), deployment));
+      }
     }
   }
 
+  public void toDataPre_GEODE_1_12_0_0(DataOutput out) throws IOException {

Review comment:
       I think I can completely remove them and let this work via the exception 
try catch model itself for the function execution too.,




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

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


Reply via email to