RFR(S): 8067211: rewrite Utils::fileAsString
Tatiana Pivovarova
tatiana.pivovarova at oracle.com
Fri Dec 12 12:37:29 UTC 2014
Hi all,
please review this small patch
bugid: https://bugs.openjdk.java.net/browse/JDK-8067211
webrev: http://cr.openjdk.java.net/~ppunegov/tpivovarova/8067211/webrev.00/
Problem:
Utils::fileAsString implementation has several issues:
- using '\n' instead of platform independent EOL
- catching wide spectre of exceptions and "ignoring" them
- partially duplicates code of Utils::fileAsList method which
duplicates File::readAllLines
Solution:
- using library method for reading lines
- using system property for EndOfLine.
Testing: jprt
Thanks,
Tatiana
More information about the hotspot-compiler-dev
mailing list