Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Commit [r4302] Maximize Restore History

Made file reading UTF-8 BOM safe

Changed ResourceUtil to make use of commons-io BOMInputStream for
reading files, so leading byte-order-marks are correctly filtered from
returned String.

To do this commons-io FileUtils.readFileToString is skipped and it's
direct usage of IOUtils is mimicked for wrapping files InputStream by
BOMInputStream.

Additionally differentiation between existing files and ClassPath
resource files when reading contents is removed.

pitpalme 2013-03-06

added /wiki/branches/pitpalme/jamwiki-core/src/test/resources/StartingPoints.us-ascii.txt
added /wiki/branches/pitpalme/jamwiki-core/src/test/resources/StartingPoints.utf8-bom.txt
added /wiki/branches/pitpalme/jamwiki-core/src/test/resources/StartingPoints.utf8.txt
changed /wiki/branches/pitpalme/jamwiki-core/src/main/java/org/jamwiki/utils/ResourceUtil.java
changed /wiki/branches/pitpalme/jamwiki-core/src/test/java/org/jamwiki/utils/ResourceUtilTest.java
/wiki/branches/pitpalme/jamwiki-core/src/test/resources/StartingPoints.us-ascii.txt Diff Switch to side-by-side view
Loading...
/wiki/branches/pitpalme/jamwiki-core/src/test/resources/StartingPoints.utf8-bom.txt Diff Switch to side-by-side view
Loading...
/wiki/branches/pitpalme/jamwiki-core/src/test/resources/StartingPoints.utf8.txt Diff Switch to side-by-side view
Loading...
/wiki/branches/pitpalme/jamwiki-core/src/main/java/org/jamwiki/utils/ResourceUtil.java Diff Switch to side-by-side view
Loading...
/wiki/branches/pitpalme/jamwiki-core/src/test/java/org/jamwiki/utils/ResourceUtilTest.java Diff Switch to side-by-side view
Loading...