Relates :
|
|
Relates :
|
Files read/writeString implementation could be cleaner if it throws CharacterCodingException instead of an IOException with an IllegalArgumentException as cause for the malformed or unmappable cases. The code can be cleaner with an import of jdk.internal.misc.JavaLangAccess rather than repeating the fully qualified class name. The definition of JLA can be moved up to the top. There's also a few inconsistencies with the existing code that would be good to fix (indenting and line length issues mostly). The test looks reasonable. In getData() then then "shouldn't happen" case should throw an exception as a NPE here might be tricky to diagnose there. Another nit is the sb field - can that be removed.