[ 
https://issues.apache.org/jira/browse/CASSANDRA-18395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ekaterina Dimitrova updated CASSANDRA-18395:
--------------------------------------------
    Test and Documentation Plan: 

{code:java}
+++ b/src/java/org/apache/cassandra/utils/concurrent/AbstractFuture.java
@@ -494,11 +494,11 @@ public abstract class AbstractFuture<V> implements 
Future<V>
     public String toString()
     {
         String description = description();
-        String state = state();
+        String state = stateInfo();
         return description == null ? state : (state + ' ' + description);
     }
 
-    private String state()
+    private String stateInfo()
     {
         Object result = this.result;
         if (isSuccess(result))
{code}

CI run needed
                         Status: Patch Available  (was: In Progress)

> Rename internal state() method in AbstractFuture to not conflict with Java 19 
> changes
> -------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-18395
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18395
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Build
>            Reporter: Sylwester Lachiewicz
>            Assignee: Sylwester Lachiewicz
>            Priority: Normal
>             Fix For: 6.x
>
>
> From Java 19 we have new method Future.state and it conflicts with our 
> private method. Fix bellow. 
> [https://download.java.net/java/early_access/jdk20/docs/api/java.base/java/util/concurrent/Future.html#state()]
>  
> {code:java}
> +++ b/src/java/org/apache/cassandra/utils/concurrent/AbstractFuture.java
> @@ -494,11 +494,11 @@ public abstract class AbstractFuture<V> implements 
> Future<V>
>      public String toString()
>      {
>          String description = description();
> -        String state = state();
> +        String state = stateInfo();
>          return description == null ? state : (state + ' ' + description);
>      }
>  
> -    private String state()
> +    private String stateInfo()
>      {
>          Object result = this.result;
>          if (isSuccess(result)){code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to