You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2025/03/05 19:03:00 UTC

[jira] [Updated] (HDDS-12456) Avoid FileInputStream and FileOutputStream

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

Attila Doroszlai updated HDDS-12456:
------------------------------------
    Description: 
Enable PMD rule [AvoidFileStream|https://docs.pmd-code.org/latest/pmd_rules_java_performance.html#avoidfilestream]:

bq. The FileInputStream and FileOutputStream classes contains a finalizer method which will cause garbage collection pauses. See [JDK-8080225|https://bugs.openjdk.org/browse/JDK-8080225] for details.

Use {{Files.newInputStream}} instead of {{new FileInputStream}}, etc.

  was:
AvoidFileStream, use Files.newInputStream, etc. instead.

https://docs.pmd-code.org/latest/pmd_rules_java_performance.html#avoidfilestream


> Avoid FileInputStream and FileOutputStream
> ------------------------------------------
>
>                 Key: HDDS-12456
>                 URL: https://issues.apache.org/jira/browse/HDDS-12456
>             Project: Apache Ozone
>          Issue Type: Task
>            Reporter: Attila Doroszlai
>            Assignee: Attila Doroszlai
>            Priority: Major
>              Labels: pull-request-available
>
> Enable PMD rule [AvoidFileStream|https://docs.pmd-code.org/latest/pmd_rules_java_performance.html#avoidfilestream]:
> bq. The FileInputStream and FileOutputStream classes contains a finalizer method which will cause garbage collection pauses. See [JDK-8080225|https://bugs.openjdk.org/browse/JDK-8080225] for details.
> Use {{Files.newInputStream}} instead of {{new FileInputStream}}, etc.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org