Fix GraalVM Lz4Substitution, SnappyCompressor methods to comply with methods defined in the Lz4Compressor and SnappyCompressor
In the 4.8.0 we introduced the regression in the Lz4Substitution.
When compiling the driver with GraalVM I got an error:
The reason for this is that methods in the Lz4Compressor were changed, whereas methods in the Lz4Substitution were not. We need to adapt those methods to the new signatures.
The same fix needs to be done for SnappySubstitution.
Without those changes, the client applications using graal cannot be compiled
Also, as a part of this issue, I suggest adding tests for substitutions. Right now, we don’t have any tests (unit, IT) that are covering the substitution logic. The most straightforward approach seems to compare the declaration of methods defined in the Lz4Compressor and Lz4Substitutionand fail the test if they are not matching. (same for SnappySubstitution and JnrLibcSubstitution)
The JnrLibcSubstitution does not need a unit test because it implements Libc - it enforces that those classes will be in sync.