diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-12-17 21:42:19 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-12-17 21:42:19 +0000 |
commit | bd1d31e410f1ec6bd589e985216167b749158dfd (patch) | |
tree | 2840563849a4d4ee10b45dd7e164ccf003076ed5 /src/ooxml/testcases | |
parent | 0e0d1d56da7d3ad69e80dae199a7f9741b385bb9 (diff) | |
download | poi-bd1d31e410f1ec6bd589e985216167b749158dfd.tar.gz poi-bd1d31e410f1ec6bd589e985216167b749158dfd.zip |
avoid string concats
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884573 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/testcases')
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java | 10 | ||||
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/ss/tests/TestWorkbookFactory.java | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java b/src/ooxml/testcases/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java index 8b7242d6ef..258c90497c 100644 --- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java +++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java @@ -357,7 +357,7 @@ public class TestSignatureInfo { assertNotNull(result); assertEquals("test-file: " + testFile, 1, result.size()); X509Certificate signer = result.get(0); - LOG.log(POILogger.DEBUG, "signer: " + signer.getSubjectX500Principal()); + LOG.log(POILogger.DEBUG, "signer: ", signer.getSubjectX500Principal()); boolean b = si.verifySignature(); assertTrue("test-file: " + testFile, b); @@ -385,8 +385,8 @@ public class TestSignatureInfo { assertEquals("test-file: " + testFile, 2, result.size()); X509Certificate signer1 = result.get(0); X509Certificate signer2 = result.get(1); - LOG.log(POILogger.DEBUG, "signer 1: " + signer1.getSubjectX500Principal()); - LOG.log(POILogger.DEBUG, "signer 2: " + signer2.getSubjectX500Principal()); + LOG.log(POILogger.DEBUG, "signer 1: ", signer1.getSubjectX500Principal()); + LOG.log(POILogger.DEBUG, "signer 2: ", signer2.getSubjectX500Principal()); boolean b = si.verifySignature(); assertTrue("test-file: " + testFile, b); @@ -527,8 +527,8 @@ public class TestSignatureInfo { } else { TimeStampServiceValidator tspValidator = (validateChain, revocationData) -> { for (X509Certificate certificate : validateChain) { - LOG.log(POILogger.DEBUG, "certificate: " + certificate.getSubjectX500Principal()); - LOG.log(POILogger.DEBUG, "validity: " + certificate.getNotBefore() + " - " + certificate.getNotAfter()); + LOG.log(POILogger.DEBUG, "certificate: ", certificate.getSubjectX500Principal()); + LOG.log(POILogger.DEBUG, "validity: ", certificate.getNotBefore(), " - ", certificate.getNotAfter()); } }; signatureConfig.setTspValidator(tspValidator); diff --git a/src/ooxml/testcases/org/apache/poi/ss/tests/TestWorkbookFactory.java b/src/ooxml/testcases/org/apache/poi/ss/tests/TestWorkbookFactory.java index 88a845df88..b17cf4f2d8 100644 --- a/src/ooxml/testcases/org/apache/poi/ss/tests/TestWorkbookFactory.java +++ b/src/ooxml/testcases/org/apache/poi/ss/tests/TestWorkbookFactory.java @@ -94,8 +94,7 @@ public final class TestWorkbookFactory { else { // TODO: close() re-writes the sample-file?! Resort to revert() for now to close file handle... LOGGER.log(POILogger.WARN, - "reverting XSSFWorkbook rather than closing it to avoid close() modifying the file on disk. " + - "Refer to bug 58779."); + "reverting XSSFWorkbook rather than closing it to avoid close() modifying the file on disk. Refer to bug 58779."); xwb.getPackage().revert(); } } else { |