You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2017/04/19 16:48:41 UTC
[jira] [Created] (LUCENE-7789) replace & forbid "new
FileInputStream" and "new FileOutputStream" with Files.newInputStream &
Files.newOutputStream
Hoss Man created LUCENE-7789:
--------------------------------
Summary: replace & forbid "new FileInputStream" and "new FileOutputStream" with Files.newInputStream & Files.newOutputStream
Key: LUCENE-7789
URL: https://issues.apache.org/jira/browse/LUCENE-7789
Project: Lucene - Core
Issue Type: Improvement
Reporter: Hoss Man
I haven't looked into the details of this much, but saw these links today and thought it would be worth opening a jira for discussion...
* https://dzone.com/articles/fileinputstream-fileoutputstream-considered-harmful
* https://issues.jenkins-ci.org/browse/JENKINS-42934
* https://bugs.openjdk.java.net/browse/JDK-8080225
The crux of the issue being that the "FileInputStream" and "FileOutputStream" classes have finalizer methods with GC overhead that can be avoided using Files.newInputStream and Files.newOutputStream in their place.
This seems like it would make these methods good candidates for forbidding in lucene/solr (if possible).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org