Don't use File(In/Out)putStream in FileBackedOutputStream 58/56958/2
authorTom Pantelis <tompantelis@gmail.com>
Fri, 12 May 2017 15:13:19 +0000 (11:13 -0400)
committerRobert Varga <nite@hq.sk>
Fri, 12 May 2017 18:53:43 +0000 (18:53 +0000)
commit6ead1cc9d35cdb72f469f7a451df3597c60c1a93
tree9e8c703874dcd939d3840be0803e019b0534508f
parentcd801d3b254bf709903b1fd31379967ab8ac1f36
Don't use File(In/Out)putStream in FileBackedOutputStream

As per https://www.cloudbees.com/blog/fileinputstream-fileoutputstream-considered-harmful
FileInputStream/FileOutputStream can incur unnecessary GC overhead due to
finalize. Use Files.newInputStream and Files.newOutputStream instead.

Change-Id: Ic4130ba650fef312e82a5039e9e11a573bd9d406
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/io/FileBackedOutputStream.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.