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

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

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



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommandQuery.java
##########
@@ -434,8 +403,8 @@ private void sendResultsAsObjectArray(SelectResults 
selectResults, int numberOfC
         } else {
           newResults = new Object[resultIndex % MAXIMUM_CHUNK_SIZE];
         }
-        for (int i = 0; i < newResults.length; i++) {
-          newResults[i] = results[i];
+        if (newResults.length >= 0) {

Review comment:
       This always evaluates to true, since arrays can't have negative length. 
Should this be `if (newResults.length > 0)`?

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommand.java
##########
@@ -164,7 +166,7 @@ public void execute(Message clientMessage, ServerConnection 
serverConnection,
     if (EntryLogger.isEnabled() && serverConnection != null) {

Review comment:
       I don't think that `serverConnection` should ever be null here, since 
`execute()` is only called from one place and the value of `serverConnection` 
used there cannot be null. Removing this check should fix several LGTM 
warnings, while you're cleaning things up in the file.

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitor.java
##########
@@ -128,22 +127,21 @@ public int getMaximumTimeBetweenPings() {
       new HashMap<>();
 
   /**
-   * Gives, version-wise, the number of clients connected to the cache servers 
in this cache, which
+   * Gives,the number of clients connected to the cache servers in this cache, 
which
    * are capable of processing received deltas.
    *
    * NOTE: It does not necessarily give the actual number of clients per 
version connected to the
    * cache servers in this cache.

Review comment:
       This note seems irrelevant and possibly confusing now.

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitor.java
##########
@@ -128,22 +127,21 @@ public int getMaximumTimeBetweenPings() {
       new HashMap<>();
 
   /**
-   * Gives, version-wise, the number of clients connected to the cache servers 
in this cache, which
+   * Gives,the number of clients connected to the cache servers in this cache, 
which

Review comment:
       Typo here. The first comma should be a space and the second comma can be 
omitted.




----------------------------------------------------------------
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:
us...@infra.apache.org


> 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