gecko-dev/mobile
Michael Comella 223d958663 Bug 1267468 - Replace FileUtils.getFileContents with read*FromFile. r=sebastian
Reasons for replacement:
 * The old method was untested
 * The Scanner class is supposedly slower than using Streams directly (which
the new methods do)
 * If possible, it's generally better not to duplicate solutions - using the
Scanner works around the infrastructure this changeset series built (i.e. using
Streams).

In the edge cases, getFileContents:
 * throws NoSuchElementException for empty files. The new behavior is to return
the empty string. Since getFileContents was always wrapped by `new JSONObject`
or similar, and we throw when the file is empty, the behavior should stay the
same.
 * throws NoSuchFileException for missing files. This is the same as the
new behavior.

MozReview-Commit-ID: 6ESPss29emU

--HG--
extra : rebase_source : 24af07bddd585b857ebd8eb4eff4c7ac4898ba37
2016-04-26 15:36:04 -07:00
..
android Bug 1267468 - Replace FileUtils.getFileContents with read*FromFile. r=sebastian 2016-04-26 15:36:04 -07:00
locales merge mozilla-inbound to mozilla-central a=merge 2016-04-25 11:55:12 +02:00