This is an automated email from the ASF dual-hosted git repository. centic pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/poi.git
commit 73b904f16d937338313d94ddfd629cb7e97eb65b Author: Dominik Stadler <[email protected]> AuthorDate: Sun Nov 16 14:17:22 2025 +0100 Remove workarounds for IBM JDK and JDK patchlevel 21.0.1 IBM JDK 11 seems to be fixed and we do not expect to run tests with JDK 21.0.1 anymore --- .../apache/poi/poifs/crypt/dsig/TestSignatureInfo.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java index d834fd1e87..539fffa58c 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java +++ b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java @@ -253,14 +253,7 @@ class TestSignatureInfo { SignatureInfo si = new SignatureInfo(); si.setOpcPackage(pkg); si.setSignatureConfig(sic); - boolean isValid = si.verifySignature(); - - // We reported https://bugs.openjdk.org/browse/JDK-8320597 because of this, it will be fixed in JDK 22 - // and maybe in newer JDK 21 patch-levels - assumeTrue(isValid && !"21.0.1".equals(System.getProperty("java.version")), - "This fails on JDK 21.0.1, see https://bugs.openjdk.org/browse/JDK-8320597"); - - assertTrue(isValid, + assertTrue(si.verifySignature(), // add some details to find out why "verifySignature()" returns false sometimes "Failed for " + System.getProperty("java.version") + ": Verifying signature failed, hasNext: " + si.getSignatureParts().iterator().hasNext() + ": " + @@ -638,8 +631,6 @@ class TestSignatureInfo { @Test void testCertChain() throws Exception { - final boolean isIBM = System.getProperty("java.vendor").contains("IBM"); - DummyKeystore ks = new DummyKeystore(testdata.getFile("chaintest.pfx"), STORE_PASS); KeyCertPair certPair = ks.getKeyPair("poitest", "test"); @@ -664,10 +655,7 @@ class TestSignatureInfo { X509Certificate signer = sp.getSigner(); assertNotNull(signer, "signer undefined?!"); List<X509Certificate> certChainRes = sp.getCertChain(); - - // IBM JDK is still buggy, even after fix for APAR IJ21985 - int exp = isIBM ? 1 : 3; - assertEquals(exp, certChainRes.size()); + assertEquals(3, certChainRes.size()); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
