From 182c855cfe5688b231700d6d5c698eb194221e98 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sun, 17 Apr 2016 20:02:17 +0000 Subject: [PATCH] reformat exclude classes regular expression for OOXMLLite git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1739643 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/util/StringUtil.java | 17 ++++++++++ .../java/org/apache/poi/util/OOXMLLite.java | 34 +++++++++++++++---- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/poi/util/StringUtil.java b/src/java/org/apache/poi/util/StringUtil.java index 7babc21c78..cb465b241c 100644 --- a/src/java/org/apache/poi/util/StringUtil.java +++ b/src/java/org/apache/poi/util/StringUtil.java @@ -574,4 +574,21 @@ public class StringUtil { 9133, // 0xf0fe bracerightbt ' ', // 0xf0ff not defined }; + + // Could be replaced with org.apache.commons.lang3.StringUtils#join + @Internal + public static String join(Object[] array, String separator) { + if (array.length == 0) return ""; + StringBuilder sb = new StringBuilder(); + sb.append(array[0]); + for (int i=1; i> lst = new ArrayList>(); //collect unit tests + String exclude = StringUtil.join("|", + "BaseTestXCell", + "TestSXSSFWorkbook\\$\\d", + "TestSXSSFWorkbook\\$NullOutputStream", + "TestUnfixedBugs", + "MemoryUsage", + "TestDataProvider", + "TestDataSamples", + "All.+Tests", + "ZipFileAssert", + "PkiTestUtils", + "TestCellFormatPart\\$\\d", + "TestSignatureInfo\\$\\d", + "TestCertificateEncryption\\$CertData", + "TestPOIXMLDocument\\$OPCParser", + "TestPOIXMLDocument\\$TestFactory", + "TestXSLFTextParagraph\\$DrawTextParagraphProxy", + "TestXSSFExportToXML\\$\\d", + "TestXSSFExportToXML\\$DummyEntityResolver", + "TestFormulaEvaluatorOnXSSF\\$Result", + "TestFormulaEvaluatorOnXSSF\\$SS", + "TestMultiSheetFormulaEvaluatorOnXSSF\\$Result", + "TestMultiSheetFormulaEvaluatorOnXSSF\\$SS", + "TestXSSFBugs\\$\\d" + ); System.out.println("Collecting unit tests from " + _testDir); - collectTests(_testDir, _testDir, lst, ".+.class$", - ".+(BaseTestXCell|TestUnfixedBugs|MemoryUsage|TestDataProvider|TestDataSamples|All.+Tests|ZipFileAssert|PkiTestUtils|TestCellFormatPart\\$\\d|TestSignatureInfo\\$\\d|" - + "TestSXSSFWorkbook\\$\\d|TestCertificateEncryption\\$CertData|TestPOIXMLDocument\\$OPCParser|TestPOIXMLDocument\\$TestFactory|TestXSLFTextParagraph\\$DrawTextParagraphProxy|" - + "TestXSSFExportToXML\\$\\d|TestXSSFExportToXML\\$DummyEntityResolver|TestSXSSFWorkbook\\$NullOutputStream|TestFormulaEvaluatorOnXSSF\\$Result|TestFormulaEvaluatorOnXSSF\\$SS|" - + "TestMultiSheetFormulaEvaluatorOnXSSF\\$Result|TestMultiSheetFormulaEvaluatorOnXSSF\\$SS|TestXSSFBugs\\$\\d).class"); + collectTests(_testDir, _testDir, lst, ".+.class$", ".+(" + exclude + ").class"); System.out.println("Found " + lst.size() + " classes"); //run tests -- 2.39.5