sarvekshayr opened a new pull request, #11248:
URL: https://github.com/apache/ozone/pull/11248

   ## What changes were proposed in this pull request?
   Removed deprecated `ThreadGroup` methods `destroy()` and `isDestroyed()`.
   
   ```
   CI / compile (25) / compile (25)
   destroy() in java.lang.ThreadGroup has been deprecated and marked for removal
   CI / compile (25) / compile (25)
   isDestroyed() in java.lang.ThreadGroup has been deprecated and marked for 
removal
   ```
   
   `destroy()` - Deprecated, for removal: This API element is subject to 
removal in a future version.
   This method was originally specified to destroy an empty thread group.
   
   `isDestroyed()` - Deprecated, for removal: This API element is subject to 
removal in a future version.
   This method originally indicated if the thread group is destroyed.
   
   Ref: 
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/ThreadGroup.html#:~:text=Concrete%20Methods-,Deprecated,-Methods
   
   ## What is the link to the Apache JIRA
   [HDDS-16406](https://issues.apache.org/jira/browse/HDDS-16406)
   
   ## How was this patch tested?
   Without fix - 
   ```
   > cd hadoop-hdds/framework
   > mvn compiler:compile -Dozone.java.version.client=17 
"-Dmaven.compiler.compilerArgs=-Xlint:removal,-AartifactId=hdds-server-framework"
 2>&1 | grep -iE "ThreadGroup has been deprecated" || echo "No ThreadGroup 
deprecation warning — good"
   [WARNING] 
/Users/sarvekshayr/project/ozone/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/BackgroundService.java:[214,55]
 isDestroyed() in java.lang.ThreadGroup has been deprecated and marked for 
removal
   [WARNING] 
/Users/sarvekshayr/project/ozone/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/BackgroundService.java:[215,18]
 destroy() in java.lang.ThreadGroup has been deprecated and marked for removal
   ```
   With fix - 
   ```
   > mvn compiler:compile -Dozone.java.version.client=17 
"-Dmaven.compiler.compilerArgs=-Xlint:removal,-AartifactId=hdds-server-framework"
 2>&1 | grep -iE "ThreadGroup has been deprecated" || echo "No ThreadGroup 
deprecation warning — good"
   No ThreadGroup deprecation warning — good
   ```
   Verified that the related test classes `TestBackgroundService` and 
`TestBlockDeletingService` passed.


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

To unsubscribe, e-mail: [email protected]

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


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

Reply via email to