[ 
https://issues.apache.org/jira/browse/GEODE-8870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17273191#comment-17273191
 ] 

ASF GitHub Bot commented on GEODE-8870:
---------------------------------------

Bill commented on a change in pull request #5947:
URL: https://github.com/apache/geode/pull/5947#discussion_r565704623



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/SocketMessageWriter.java
##########
@@ -45,46 +47,41 @@ public void writeHandshakeMessage(DataOutputStream dos, 
byte type, String p_msg,
       msg = "";
     }
     dos.writeUTF(msg);
-    if (clientVersion != null && 
clientVersion.isNotOlderThan(KnownVersion.GFE_61)) {
-      // get all the instantiators.
-      Instantiator[] instantiators = InternalInstantiator.getInstantiators();
-      HashMap instantiatorMap = new HashMap();
-      if (instantiators != null && instantiators.length > 0) {
-        for (Instantiator instantiator : instantiators) {
-          ArrayList instantiatorAttributes = new ArrayList();
-          
instantiatorAttributes.add(instantiator.getClass().toString().substring(6));
-          
instantiatorAttributes.add(instantiator.getInstantiatedClass().toString().substring(6));
-          instantiatorMap.put(instantiator.getId(), instantiatorAttributes);
-        }
+

Review comment:
       I have manually verified that `clientVersion` comes from 
`ClientRegistrationMetadata` which acquires it in 
`getAndValidateClientVersion()` called from `initialize()` which is called 
before this method (`writeHandshakeMessage`). When there is a failure to get 
`clientVersion` this method is not called.
   
   I see a [Geode dev list discussion from 
2017](https://markmail.org/search/?q=list%3Aorg.apache.geode.dev+order%3Adate-backward+notnull#query:list%3Aorg.apache.geode.dev%20order%3Adate-backward%20notnull+page:1+mid:daov733nyw5xbhps+state:results)
 where use of the JetBrains `@NotNull` annotations were discussed with a couple 
folks agreeing they would be good for Geode. I approve this code as-is, but if 
you'd like to add some `@NotNull` annos here that would be worth an extra slice 
of cake 🍰 .




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


> Remove obsolete version compatibility code
> ------------------------------------------
>
>                 Key: GEODE-8870
>                 URL: https://issues.apache.org/jira/browse/GEODE-8870
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Jacob Barrett
>            Assignee: Jacob Barrett
>            Priority: Major
>              Labels: pull-request-available
>
> As a followup to GEODE-8837 remove all obsolete backwards compatibility code.
> This ticket will catch all changes to remove the obsolete code.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to