Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New version, Java 11, System.Logger, AutoCloseable, XmlSignatureInput…
… types (#192) * Start of the development od version 4.0.0 Signed-off-by: David Matějček <[email protected]> * POM Updates - JDK11 instead of JDK8 - Added failsafe (skipped by default) - Removed JDK profiles - Removed dependency on SLF4J and LOGJ, XML-APIs - Updated dependency: Jetty, Maven - To be continued ... Signed-off-by: David Matějček <[email protected]> * Using System.Logger instead SLF4J - except tests - Allows to use also SLF4J2, previous version wasn't compatible Signed-off-by: David Matějček <[email protected]> * Added module-info.java Signed-off-by: David Matějček <[email protected]> * Fixed version in XMLDSigRI Signed-off-by: David Matějček <[email protected]> * Added AutoCloseable to readers and writers Signed-off-by: David Matějček <[email protected]> * Method getBytesFromFile made deprecated - Used just in tests, but might be used by users Signed-off-by: David Matějček <[email protected]> * BufferedStreams replaced by Files.new*Stream calls Signed-off-by: David Matějček <[email protected]> * JMH tests targetting performance (and leaks) - PerformanceIT is able to detect leaks - has limited memory - slows down with executions in a single batch - fails if executions significantly slow down - fails if iterations don't pass limits - now fails DOM tests, seems there is some leak. - replaces two ignored tests PerformanceMemoryTest and PerformanceTimingTest - is executed by the failsafe plugin just on demand: use -DskipIT=false Signed-off-by: David Matějček <[email protected]> * Cleanups in tests - using Java11+ features - Created JmhUtils to help JMH - System.Logger usages instead of slf4j - Fixed some IO leaks in tests - unclosed streams - XMLUtilsPerformanceTest now uses JMH - Removed log4j2.properties Signed-off-by: David Matějček <[email protected]> * Updated xml.bind versions Signed-off-by: David Matějček <[email protected]> * Fixed dependencies based on tests with GlassFish and Metro Webservices Signed-off-by: David Matějček <[email protected]> * Tolerate returning a null byte array Signed-off-by: David Matějček <[email protected]> * Properly closing streams in tests - added readResource method - also added several utility methods just for tests - reduced copy and paste Signed-off-by: David Matějček <[email protected]> * First clean field references, then close - close may throw an exception Signed-off-by: David Matějček <[email protected]> * Yet some resource leaks in tests fixed/prevented + fixed calls Signed-off-by: David Matějček <[email protected]> * Sources and target Java version set to 11 without overriding Signed-off-by: David Matějček <[email protected]> * Fixed license Signed-off-by: David Matějček <[email protected]> * Cleanups based on PMD, javadoc Signed-off-by: David Matějček <[email protected]> * XMLUtils benchmark moved under the failsafe plugin too Signed-off-by: David Matějček <[email protected]> * Added buffers to XmlUtils - nearly 10 times faster DOM benchmarks - lower variability in benchmark results Signed-off-by: David Matějček <[email protected]> # Conflicts: # src/main/java/org/apache/xml/security/utils/XMLUtils.java * Updated PMD Signed-off-by: David Matějček <[email protected]> * Larger buffers, 8K is quite standard these days Signed-off-by: David Matějček <[email protected]> * XMLSignatureInput vs. resource leaks - I have noticed that in tests a new FileInputStream is given as an argument to this class, and then there's no control over it's lifecycle. - Therefore I have added the finalize method to print warnings at least until I would be able to change it to more reliable implementation. Signed-off-by: David Matějček <[email protected]> * JaCoCo configuration Signed-off-by: David Matějček <[email protected]> * Refactoring around XMLSignatureInput - It was split to several classes based on the type of the input data. - Shouldn't those backed by an InputStream be AutoCloseable? - I have seen unclosed file input streams in logs after some failures - The class is also extended in other projects (WSIT, for example) Signed-off-by: David Matějček <[email protected]> * Refactored PerformanceIT - each class has own file Signed-off-by: David Matějček <[email protected]> * JUnit5 tests should not be public, says PMD Signed-off-by: David Matějček <[email protected]> * Following PMD advices for tests Signed-off-by: David Matějček <[email protected]> * XMLSignatureStreamInput: finalize replaced by close - Safer implementation which allows better control over the stream closure. - Allows also different implementations. Signed-off-by: David Matějček <[email protected]> * Fixed XMLSignatureEdDSATest Signed-off-by: David Matějček <[email protected]> # Conflicts: # src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/SignatureValidator.java # src/test/java/org/apache/xml/security/test/javax/xml/crypto/dsig/XMLSignatureEdDSATest.java * Making PMD happy - BeanMembersShouldSerialize was replaced by NonSerializableClass - TestClassWithoutTestCases has false positives - JUnit5 tests should be package protected Signed-off-by: David Matějček <[email protected]> # Conflicts: # src/test/java/org/apache/xml/security/test/dom/signature/EDDSASignatureTest.java * Updated JAXB Runtime and Jakarta Activation Signed-off-by: David Matějček <[email protected]> * Removed nonexisting sourceEncoding property from the PMD config Signed-off-by: David Matějček <[email protected]> * The test_sixteen_bad_signature made compliant with rules Signed-off-by: David Matějček <[email protected]> * Fixed logging of Jetty + level in tests made configurable again - mvn clean install -Dtest.logging.level=FINEST - using nanoseconds in logs Signed-off-by: David Matějček <[email protected]> # Conflicts: # pom.xml * Upgraded PMD to 3.21.0 Signed-off-by: David Matějček <[email protected]> * Fixed lost @test (reported by PMD) Signed-off-by: David Matějček <[email protected]> * Don't swallow exceptions Signed-off-by: David Matějček <[email protected]> * Updated jaxb runtime to 4.0.3 Signed-off-by: David Matějček <[email protected]> * Updated GitHub Actions configuration Signed-off-by: David Matějček <[email protected]> * Reverted changes which are not necessary and just improved the code quality Signed-off-by: David Matějček <[email protected]> * Pom cleanup - using activation-api.version - synced compiler, javadoc and modernizer release options - javadoc uses compiler settings by default - modernizer needs an explicit value - compiler uses the maven.compiler.release property - removed redundant junit version property Signed-off-by: David Matějček <[email protected]> * Javadoc lost in rebase is back Signed-off-by: David Matějček <[email protected]> * Fixed method name (canonicalize) Signed-off-by: David Matějček <[email protected]> --------- Signed-off-by: David Matějček <[email protected]>
- Loading branch information