You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/05/21 21:22:41 UTC
svn commit: r1890089 [1/6] - in /poi/trunk: ./ poi-examples/
poi-examples/src/main/java/org/apache/poi/examples/hpsf/
poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/
poi-examples/src/main/java/org/apache/poi/examples/xssf/stream...
Author: kiwiwings
Date: Fri May 21 21:22:40 2021
New Revision: 1890089
URL: http://svn.apache.org/viewvc?rev=1890089&view=rev
Log:
activate javadoc lint and fix errors
add signing and checksum generation
add slf4j-bridge for tests
add dependencies to ooxml-lite
fix complex enum classes
add override annotations
move gradle logic to root build
generate javadoc in its own dist directory, because JPMS complains about duplicate modules otherwise
Added:
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/OperatorEnum.java (with props)
Modified:
poi/trunk/build.gradle
poi/trunk/poi-examples/build.gradle
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/LoadPasswordProtectedXlsxStreaming.java
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/SavePasswordProtectedXlsx.java
poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LoadPasswordProtectedXlsx.java
poi/trunk/poi-excelant/build.gradle
poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java
poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java
poi/trunk/poi-integration/build.gradle
poi/trunk/poi-ooxml-full/build.gradle
poi/trunk/poi-ooxml-lite/build.gradle
poi/trunk/poi-ooxml/build.gradle
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/SignatureFacet.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampServiceValidator.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChart.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/text/XDDFTextRun.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFShape.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/model/ThemesTable.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFEvaluationSheet.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/DefaultIndexedColorMap.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFCell.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFChart.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFClientAnchor.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFConnector.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDataValidationConstraint.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDxfStyleProvider.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvaluationSheet.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenFooter.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFEvenHeader.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstFooter.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFirstHeader.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFont.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFFormulaEvaluator.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFHeaderFooterProperties.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFLineBreak.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFOddFooter.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFOddHeader.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFShape.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableStyleInfo.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTextRun.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFVBAPart.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/IBody.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/ISDTContent.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFChart.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFComments.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFFooter.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFHeader.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFPicture.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFSDTContent.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFStyle.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java
poi/trunk/poi-ooxml/src/test/java/org/apache/poi/xdgf/usermodel/section/TestCombinedIterator.java
poi/trunk/poi-scratchpad/build.gradle
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/extractor/QuickButCruddyTextExtractor.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/ActiveXShape.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/Polygon.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/SlideListWithText.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFBackground.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFComment.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShape.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwmf/draw/HwmfDrawProperties.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfEscape.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfFill.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfRecord.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/CharIndexTranslator.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FileInformationBlock.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldCHPBinTable.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldTextPiece.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldTextPieceTable.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PlexOfCps.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PlfLfo.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPiece.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPieceTable.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/HeaderStories.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Picture.java
poi/trunk/poi-scratchpad/src/main/java/org/apache/poi/hwpf/util/DoubleByteUtil.java
poi/trunk/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToHtmlConverter.java
poi/trunk/poi/build.gradle
poi/trunk/poi/src/main/java/org/apache/poi/ddf/EscherRecordTypes.java
poi/trunk/poi/src/main/java/org/apache/poi/ddf/EscherShapePathProperty.java
poi/trunk/poi/src/main/java/org/apache/poi/extractor/ExtractorFactory.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/record/ProtectionRev4Record.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/record/RKRecord.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/record/WriteAccessRecord.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/record/chart/TickRecord.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/record/common/UnicodeString.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCell.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFChildAnchor.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFComment.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFEvaluationSheet.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFFont.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPatternFormatting.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPictureData.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFRichTextString.java
poi/trunk/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFShapeContainer.java
poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/ChunkedCipherOutputStream.java
poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/EncryptionHeader.java
poi/trunk/poi/src/main/java/org/apache/poi/poifs/crypt/package-info.java
poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/DirectoryEntry.java
poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/DirectoryNode.java
poi/trunk/poi/src/main/java/org/apache/poi/poifs/filesystem/FilteringDirectoryNode.java
poi/trunk/poi/src/main/java/org/apache/poi/sl/usermodel/Sheet.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/format/SimpleFraction.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/BaseFormulaEvaluator.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/CacheAreaEval.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/ConditionalFormattingEvaluator.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/EvaluationConditionalFormatRule.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/EvaluationSheet.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/FormulaType.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/LazyAreaEval.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/SharedFormula.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/TwoDEval.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/constant/ConstantValueParser.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/AreaEval.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/AreaEvalBase.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/PercentEval.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationSheet.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Bin2Dec.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Code.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Complex.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/DateValue.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Delta.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/EOMonth.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/FactDouble.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Frequency.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Hex2Dec.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/ImReal.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Imaginary.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Intercept.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Oct2Dec.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Quotient.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Rept.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Roman.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/Slope.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/functions/WeekNum.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/BuiltinFormats.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/Comment.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/ExcelNumberFormat.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/Table.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/TableStyle.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/usermodel/TableStyleType.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/util/CellRangeAddress.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/util/CellRangeAddressBase.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/util/PropertyTemplate.java
poi/trunk/poi/src/main/java/org/apache/poi/ss/util/SheetBuilder.java
poi/trunk/poi/src/main/java/org/apache/poi/util/DocumentFormatException.java
poi/trunk/poi/src/main/java/org/apache/poi/util/GenericRecordUtil.java
poi/trunk/poi/src/main/java/org/apache/poi/util/LocaleID.java
poi/trunk/poi/src/main/java/org/apache/poi/util/LocaleUtil.java
poi/trunk/poi/src/test/resources/log4j2-test.xml
Modified: poi/trunk/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/build.gradle?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/build.gradle (original)
+++ poi/trunk/build.gradle Fri May 21 21:22:40 2021
@@ -14,6 +14,7 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
+
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
@@ -85,15 +86,15 @@ allprojects {
}
/**
-
Define things that are only necessary in sub-projects, but not in the master-project itself
-
*/
subprojects {
//Put instructions for each sub project, but not the master
apply plugin: 'java-library'
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
+ apply plugin: 'signing'
+
version = '5.0.1-SNAPSHOT'
ext {
@@ -122,12 +123,8 @@ subprojects {
options.deprecation = true
}
- tasks.withType(Jar) {
- duplicatesStrategy = 'fail'
- }
-
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
@@ -145,7 +142,41 @@ subprojects {
task wrapper(type: Wrapper){
// https://stackoverflow.com/a/65701523/2066598
- gradleVersion = '6.8'
+ gradleVersion = '7.0.1'
+ }
+
+ java {
+ withJavadocJar()
+ withSourcesJar()
+ }
+
+ javadoc {
+ failOnError = true
+ maxMemory = "1024M"
+ doFirst {
+ options {
+ if (JavaVersion.current().isJava9Compatible()) {
+ addBooleanOption('html5', true)
+ }
+ addBooleanOption('Xdoclint:all,-missing', true)
+ links 'https://poi.apache.org/apidocs/dev/'
+ links 'https://docs.oracle.com/javase/8/docs/api/'
+ links 'https://xmlbeans.apache.org/docs/5.0.0/'
+ use = true
+ splitIndex = true
+ source = "1.8"
+ }
+ }
+ }
+
+ tasks.withType(Jar) {
+ duplicatesStrategy = 'fail'
+ destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
+
+ doLast {
+ ant.checksum(file: it.archivePath, algorithm: 'SHA-256', fileext: '.sha256', format: 'MD5SUM')
+ ant.checksum(file: it.archivePath, algorithm: 'SHA-512', fileext: '.sha512', format: 'MD5SUM')
+ }
}
jar {
@@ -154,6 +185,17 @@ subprojects {
}
}
+ javadocJar {
+ // if javadocs and binaries are in the same directory, JPMS complaints about duplicated modules
+ // in the module-path
+ destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-javadoc")
+ }
+
+ sourcesJar {
+ destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
+ exclude 'META-INF/services/**'
+ }
+
test {
// make XML test-results available for Jenkins CI
useJUnitPlatform()
@@ -176,7 +218,21 @@ subprojects {
maxHeapSize = "768m"
// Specifying the local via system properties did not work, so we set them this way
- jvmArgs '-Duser.language=en -Duser.country=US'
+ jvmArgs << [
+ '-Djava.io.tmpdir=build',
+ '-DPOI.testdata.path=../test-data',
+ '-Djava.awt.headless=true',
+ '-Djava.locale.providers=JRE,CLDR',
+ '-Duser.language=en',
+ '-Duser.country=US',
+ '-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl',
+ "-Dversion.id=${project.version}",
+ '-ea',
+ '-Djunit.jupiter.execution.parallel.enabled=true',
+ '-Djunit.jupiter.execution.parallel.config.strategy=fixed',
+ '-Djunit.jupiter.execution.parallel.config.fixed.parallelism=3'
+ // -Xjit:verbose={compileStart|compileEnd},vlog=build/jit.log${no.jit.sherlock} ... if ${isIBMVM}
+ ]
// show standard out and standard error of the test JVM(s) on the console
//testLogging.showStandardStreams = true
@@ -190,6 +246,23 @@ subprojects {
systemProperties['java.locale.providers'] = 'JRE,CLDR'
systemProperties['junit.jupiter.execution.parallel.enabled'] = 'false'
+
+ doFirst {
+ if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
+ jvmArgs += [
+ '-Dsun.reflect.debugModuleAccessChecks=true',
+ '-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
+ '--illegal-access=warn',
+
+ // see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
+ // opposed to the recommendation there, it doesn't work to add ... to the dependencies
+ // testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.7.1'
+ // gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
+ '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
+ '--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
+ ]
+ }
+ }
}
jacoco {
@@ -242,10 +315,15 @@ subprojects {
publications {
POI(MavenPublication) {
groupId 'org.apache.poi'
+ artifactId project.archivesBaseName
+
+ from components.java
pom {
packaging = 'jar'
url = 'https://poi.apache.org/'
+ name = 'Apache POI'
+ description = 'Apache POI - Java API To Access Microsoft Format Files'
mailingLists {
mailingList {
@@ -278,7 +356,9 @@ subprojects {
withXml {
def r = asElement()
def doc = r.getOwnerDocument()
- def asl = doc.createComment(new File('../legal/HEADER').text)
+ def hdr = new File('../legal/HEADER')
+ if (!hdr.exists()) hdr = new File('legal/HEADER')
+ def asl = doc.createComment(hdr.text)
// adding ASF header before root node is ignored
// doc.insertBefore(asl, doc.getDocumentElement())
r.insertBefore(asl, r.getFirstChild())
@@ -287,18 +367,12 @@ subprojects {
}
}
}
-}
-// Make JavaDoc behave similar to Ant, i.e. be a bit more lenient
-// and define amount of memory
-// https://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
-if (JavaVersion.current().isJava8Compatible()) {
- allprojects {
- tasks.withType(Javadoc) {
- options.addStringOption('Xdoclint:none', '-quiet')
- maxMemory="384M"
- }
- }
+ generatePomFileForPOIPublication.destination = "../build/dist/maven/${project.archivesBaseName}/${project.archivesBaseName}-${project.version}.pom"
+
+ signing {
+ sign publishing.publications.POI
+ }
}
// initial try to provide a combined JavaDoc, grouping is still missing here, though!
@@ -313,6 +387,7 @@ task allJavaDoc(type: Javadoc) {
// for possible options see https://docs.gradle.org/current/javadoc/org/gradle/external/javadoc/StandardJavadocDocletOptions.html
options.use = true
options.splitIndex = true
+ options.addBooleanOption('Xdoclint:all,-missing', true)
title = 'POI API Documentation'
options.bottom = '<![CDATA[<i>Copyright ' + new Date().format('yyyy') + ' The Apache Software Foundation or\n' +
Modified: poi/trunk/poi-examples/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-examples/build.gradle?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-examples/build.gradle (original)
+++ poi/trunk/poi-examples/build.gradle Fri May 21 21:22:40 2021
@@ -43,12 +43,6 @@ final String MODULE_NAME = 'org.apache.p
final Pattern MODULE_REGEX = ~'\\.jar$'
final List MAIN_MODULE_PATH = sourceSets.main.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX }.collect{ it.parent }.unique()
-java {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
- withSourcesJar()
-}
-
task compileJava9(type: JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
@@ -83,7 +77,3 @@ jar {
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
}
}
-
-sourcesJar {
- destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
-}
Modified: poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java (original)
+++ poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/hpsf/CopyCompare.java Fri May 21 21:22:40 2021
@@ -42,23 +42,23 @@ import org.apache.poi.poifs.filesystem.P
import org.apache.poi.util.TempFile;
/**
- * <p>This class copies a POI file system to a new file and compares the copy
- * with the original.</p>
+ * This class copies a POI file system to a new file and compares the copy
+ * with the original.
* <p>
- * <p>Property set streams are copied logically, i.e. the application
+ * Property set streams are copied logically, i.e. the application
* establishes a {@link org.apache.poi.hpsf.PropertySet} of an original property
* set, creates a {@link org.apache.poi.hpsf.PropertySet} and writes the
* {@link org.apache.poi.hpsf.PropertySet} to the destination POI file
* system. - Streams which are no property set streams are copied bit by
- * bit.</p>
+ * bit.
* <p>
- * <p>The comparison of the POI file systems is done logically. That means that
+ * The comparison of the POI file systems is done logically. That means that
* the two disk files containing the POI file systems do not need to be
* exactly identical. However, both POI file systems must contain the same
* files, and most of these files must be bitwise identical. Property set
* streams, however, are compared logically: they must have the same sections
* with the same attributes, and the sections must contain the same properties.
- * Details like the ordering of the properties do not matter.</p>
+ * Details like the ordering of the properties do not matter.
*/
@SuppressWarnings({"java:S106","java:S4823"})
public final class CopyCompare {
Modified: poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/LoadPasswordProtectedXlsxStreaming.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/LoadPasswordProtectedXlsxStreaming.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/LoadPasswordProtectedXlsxStreaming.java (original)
+++ poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/eventusermodel/LoadPasswordProtectedXlsxStreaming.java Fri May 21 21:22:40 2021
@@ -30,10 +30,10 @@ import org.apache.poi.xssf.eventusermode
/**
* An example that loads a password protected workbook and counts the sheets.
* The example highlights how to do this in streaming way.
- * <p><ul>
+ * <ul>
* <li>The example demonstrates that all temp files are removed.
- * <li><code>AesZipFileZipEntrySource</code> is used to ensure that temp files are encrypted.
- * </ul><p>
+ * <li>{@code AesZipFileZipEntrySource} is used to ensure that temp files are encrypted.
+ * </ul>
*/
@SuppressWarnings({"java:S106","java:S4823","java:S1192"})
public final class LoadPasswordProtectedXlsxStreaming {
Modified: poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/SavePasswordProtectedXlsx.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/SavePasswordProtectedXlsx.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/SavePasswordProtectedXlsx.java (original)
+++ poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/streaming/SavePasswordProtectedXlsx.java Fri May 21 21:22:40 2021
@@ -41,10 +41,10 @@ import org.apache.poi.xssf.streaming.SXS
/**
* An example that outputs a simple generated workbook that is password protected.
* The example highlights how to do this in streaming way.
- * <p><ul>
+ * <ul>
* <li>The example demonstrates that all temp files are removed.
- * <li><code>SXSSFWorkbookWithCustomZipEntrySource</code> extends SXSSFWorkbook to ensure temp files are encrypted.
- * </ul><p>
+ * <li>{@code SXSSFWorkbookWithCustomZipEntrySource} extends SXSSFWorkbook to ensure temp files are encrypted.
+ * </ul>
*/
@SuppressWarnings({"java:S106","java:S4823","java:S1192"})
public final class SavePasswordProtectedXlsx {
Modified: poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LoadPasswordProtectedXlsx.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LoadPasswordProtectedXlsx.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LoadPasswordProtectedXlsx.java (original)
+++ poi/trunk/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/LoadPasswordProtectedXlsx.java Fri May 21 21:22:40 2021
@@ -32,10 +32,10 @@ import org.apache.poi.xssf.usermodel.XSS
/**
* An example that loads a password protected workbook and counts the sheets.
- * <p><ul>
+ * <ul>
* <li>The example demonstrates that all temp files are removed.
- * <li><code>AesZipFileZipEntrySource</code> is used to ensure that temp files are encrypted.
- * </ul></p>
+ * <li>{@code AesZipFileZipEntrySource} is used to ensure that temp files are encrypted.
+ * </ul>
*/
@SuppressWarnings({"java:S106","java:S4823","java:S1192"})
public final class LoadPasswordProtectedXlsx {
Modified: poi/trunk/poi-excelant/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-excelant/build.gradle?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-excelant/build.gradle (original)
+++ poi/trunk/poi-excelant/build.gradle Fri May 21 21:22:40 2021
@@ -47,6 +47,7 @@ dependencies {
testImplementation project(path: ':poi-ooxml', configuration: 'tests')
testImplementation project(path: ':poi-scratchpad', configuration: 'tests')
testImplementation 'com.google.guava:guava:30.0-jre'
+ testImplementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1'
}
final String MODULE_NAME = 'org.apache.poi.excelant'
@@ -60,13 +61,6 @@ final String OOXML_LITE_REPORT = '../bui
final String OOXML_LITE_JAR = "../build/dist/maven/poi-ooxml-lite/poi-ooxml-lite-${project.version}.jar"
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
-java {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
- withJavadocJar()
- withSourcesJar()
-}
-
task compileJava9(type: JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
@@ -146,18 +140,6 @@ task testJar(type: Jar, dependsOn: testC
}
}
-sourcesJar {
- destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
-}
-
-javadoc {
-// fails currently, need to fix the sources
- failOnError = false
-// if(JavaVersion.current().isJava9Compatible()) {
-// options.addBooleanOption('html5', true)
-// }
-}
-
artifacts {
tests testJar
}
@@ -165,40 +147,13 @@ artifacts {
test {
dependsOn { testJar }
- useJUnitPlatform()
-
doFirst {
- jvmArgs = [
- '-Djava.io.tmpdir=build',
- '-DPOI.testdata.path=../test-data',
- '-Djava.awt.headless=true',
- '-Djava.locale.providers=JRE,CLDR',
- '-Duser.language=en',
- '-Duser.country=US',
- '-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl',
- "-Dversion.id=${project.version}",
- '-ea',
+ jvmArgs += [
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
- '-Djunit.jupiter.execution.parallel.enabled=true',
- '-Djunit.jupiter.execution.parallel.config.strategy=fixed',
- '-Djunit.jupiter.execution.parallel.config.fixed.parallelism=3'
- // -Xjit:verbose={compileStart|compileEnd},vlog=build/jit.log${no.jit.sherlock} ... if ${isIBMVM}
]
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
jvmArgs += [
- '-Dsun.reflect.debugModuleAccessChecks=true',
- '-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
- '--illegal-access=warn',
-
'--add-modules', MODULE_NAME,
-
- // see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
- // opposed to the recommendation there, it doesn't work to add ... to the dependencies
- // testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.7.1'
- // gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
- '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
- '--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
-
'--module-path', '../build/dist/maven/poi-excelant-tests:' + files(TEST_MODULE_PATH).asPath,
]
}
@@ -208,16 +163,10 @@ test {
publishing {
publications {
POI(MavenPublication) {
- artifactId project.archivesBaseName
-
- from components.java
-
pom {
- name = 'Apache POI - API based on OPC and OOXML schemas'
+ name = 'Apache POI - ExcelAnt'
description = 'Apache POI - Java API To Access Microsoft Format Files'
}
}
}
}
-
-generatePomFileForPOIPublication.destination = "../build/dist/maven/${project.archivesBaseName}/${project.archivesBaseName}-${project.version}.pom"
Modified: poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java (original)
+++ poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/ExcelAntHandlerTask.java Fri May 21 21:22:40 2021
@@ -23,7 +23,7 @@ import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
/**
- * This is the class that backs the <handler> tag in the Ant task.
+ * This is the class that backs the {@code <handler>} tag in the Ant task.
* <p>
* Its purpose is to provide a way to manipulate a workbook in the course
* of an ExcelAnt task. The idea being to model a way for test writers to
@@ -36,7 +36,7 @@ import org.apache.tools.ant.Task;
* class you write to manipulate the workbook.
* <p>
* In order to use this tag you must write a class that implements the
- * <code>IExcelAntWorkbookHandler</code> interface. After writing the
+ * {@code IExcelAntWorkbookHandler} interface. After writing the
* class you should package it and it's dependencies into a jar file to
* add as library in your Ant build file.
*/
Modified: poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java (original)
+++ poi/trunk/poi-excelant/src/main/java/org/apache/poi/ss/excelant/util/ExcelAntWorkbookUtil.java Fri May 21 21:22:40 2021
@@ -187,8 +187,6 @@ public class ExcelAntWorkbookUtil extend
/**
* Returns the Workbook instance associated with this WorkbookUtil.
- *
- * @return
*/
public Workbook getWorkbook() {
return workbook;
@@ -197,8 +195,6 @@ public class ExcelAntWorkbookUtil extend
/**
* Returns the fileName that was used to initialize this instance. May
* return null if the instance was constructed from a Workbook object.
- *
- * @return
*/
public String getFileName() {
return excelFileName;
@@ -206,8 +202,6 @@ public class ExcelAntWorkbookUtil extend
/**
* Returns the list of sheet names.
- *
- * @return
*/
public List<String> getSheets() {
ArrayList<String> sheets = new ArrayList<>();
@@ -224,9 +218,6 @@ public class ExcelAntWorkbookUtil extend
/**
* This method uses a String in standard Excel format (SheetName!CellId) to
* locate the cell and set it to the value of the double in value.
- *
- * @param cellName
- * @param value
*/
public void setDoubleValue(String cellName, double value) {
log("starting setCellValue()", Project.MSG_DEBUG);
@@ -240,9 +231,6 @@ public class ExcelAntWorkbookUtil extend
/**
* Utility method for setting the value of a Cell with a String.
- *
- * @param cellName
- * @param value
*/
public void setStringValue(String cellName, String value) {
Cell cell = getCell(cellName);
@@ -251,9 +239,6 @@ public class ExcelAntWorkbookUtil extend
/**
* Utility method for setting the value of a Cell with a Formula.
- *
- * @param cellName
- * @param formula
*/
public void setFormulaValue(String cellName, String formula) {
Cell cell = getCell(cellName);
@@ -262,8 +247,6 @@ public class ExcelAntWorkbookUtil extend
/**
* Utility method for setting the value of a Cell with a Date.
- * @param cellName
- * @param date
*/
public void setDateValue(String cellName, Date date) {
Cell cell = getCell(cellName);
@@ -272,15 +255,11 @@ public class ExcelAntWorkbookUtil extend
/**
* Uses a String in standard Excel format (SheetName!CellId) to locate a
* cell and evaluate it.
- *
- * @param cellName
- * @param expectedValue
- * @param precision
*/
public ExcelAntEvaluationResult evaluateCell(String cellName, double expectedValue,
double precision) {
- ExcelAntEvaluationResult evalResults = null;
+ ExcelAntEvaluationResult evalResults;
Cell cell = getCell(cellName);
@@ -304,12 +283,11 @@ public class ExcelAntWorkbookUtil extend
"Evaluation passed without error within in range.", delta, cellName);
}
} else {
- String errorMeaning = null;
+ String errorMeaning;
try {
errorMeaning = FormulaError.forInt(resultOfEval.getErrorValue()).getString();
} catch(IllegalArgumentException iae) {
- errorMeaning = "unknown error code: " +
- Byte.toString(resultOfEval.getErrorValue());
+ errorMeaning = "unknown error code: " + resultOfEval.getErrorValue();
}
evalResults = new ExcelAntEvaluationResult(true, false,
@@ -325,9 +303,6 @@ public class ExcelAntWorkbookUtil extend
/**
* Returns a Cell as a String value.
- *
- * @param cellName
- * @return
*/
public String getCellAsString(String cellName) {
Cell cell = getCell(cellName);
@@ -337,9 +312,6 @@ public class ExcelAntWorkbookUtil extend
/**
* Returns the value of the Cell as a double.
- *
- * @param cellName
- * @return
*/
public double getCellAsDouble(String cellName) {
Cell cell = getCell(cellName);
@@ -349,9 +321,6 @@ public class ExcelAntWorkbookUtil extend
* Returns a cell reference based on a String in standard Excel format
* (SheetName!CellId). This method will create a new cell if the
* requested cell isn't initialized yet.
- *
- * @param cellName
- * @return
*/
private Cell getCell(String cellName) {
CellReference cellRef = new CellReference(cellName);
Modified: poi/trunk/poi-integration/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-integration/build.gradle?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-integration/build.gradle (original)
+++ poi/trunk/poi-integration/build.gradle Fri May 21 21:22:40 2021
@@ -46,6 +46,7 @@ dependencies {
testImplementation project(path:':poi-ooxml', configuration:'tests')
testImplementation project(path:':poi-scratchpad', configuration:'tests')
testImplementation project(path: ':poi-ooxml-lite-agent', configuration: 'archives')
+ testImplementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1'
}
final String MODULE_NAME = 'org.apache.poi.stress'
@@ -125,45 +126,15 @@ test {
dependsOn { testJar }
- useJUnitPlatform()
-
doFirst {
- jvmArgs = [
- '-Djava.io.tmpdir=build',
- '-DPOI.testdata.path=../test-data',
- '-Djava.awt.headless=true',
- '-Djava.locale.providers=JRE,CLDR',
- '-Duser.language=en',
- '-Duser.country=US',
- '-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl',
- "-Dversion.id=${project.version}",
- '-ea',
+ jvmArgs += [
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
-
- '-Djunit.jupiter.execution.parallel.enabled=true',
- '-Djunit.jupiter.execution.parallel.config.strategy=fixed',
- '-Djunit.jupiter.execution.parallel.config.fixed.parallelism=3'
- // -Xjit:verbose={compileStart|compileEnd},vlog=build/jit.log${no.jit.sherlock} ... if ${isIBMVM}
]
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
jvmArgs += [
- '-Dsun.reflect.debugModuleAccessChecks=true',
- '-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
- '--illegal-access=warn',
-
'--add-modules', MODULE_NAME,
-
- // see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
- // opposed to the recommendation there, it doesn't work to add ... to the dependencies
- // testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.7.1'
- // gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
- '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
- '--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
-
'--module-path', '../build/dist/maven/poi-integration-tests:' + files(TEST_MODULE_PATH).asPath,
]
}
}
}
-
-generatePomFileForPOIPublication.destination = "../build/dist/maven/${project.archivesBaseName}/${project.archivesBaseName}-${project.version}.pom"
Modified: poi/trunk/poi-ooxml-full/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml-full/build.gradle?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml-full/build.gradle (original)
+++ poi/trunk/poi-ooxml-full/build.gradle Fri May 21 21:22:40 2021
@@ -54,8 +54,6 @@ final List MAIN_MODULE_PATH = sourceSets
compileJava {
dependsOn 'generate_beans'
- sourceCompatibility = 8
- targetCompatibility = 8
}
task compileJava9(type: JavaCompile) {
@@ -133,26 +131,6 @@ task generate_beans(dependsOn: copy_xsds
}
}
-tasks.withType(Jar) {
- destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
-}
-
-javadoc {
- failOnError = true
- maxMemory = "1024M"
- doFirst {
- options {
- if (JavaVersion.current().isJava9Compatible()) {
- addBooleanOption('html5', true)
- }
- links 'https://xmlbeans.apache.org/docs/5.0.0/'
- use = true
- splitIndex = true
- source = "1.8"
- }
- }
-}
-
task sourceJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allJava
@@ -175,11 +153,6 @@ jar {
publishing {
publications {
POI(MavenPublication) {
- artifactId "${project.archivesBaseName}"
-
- from components.java
- artifact tasks.sourceJar
-
pom {
name = 'Apache POI - OOXML schemas (full)'
description =
@@ -189,5 +162,3 @@ publishing {
}
}
}
-
-generatePomFileForPOIPublication.destination = "../build/dist/maven/${project.archivesBaseName}/${project.archivesBaseName}-${project.version}.pom"
Modified: poi/trunk/poi-ooxml-lite/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml-lite/build.gradle?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml-lite/build.gradle (original)
+++ poi/trunk/poi-ooxml-lite/build.gradle Fri May 21 21:22:40 2021
@@ -1,6 +1,4 @@
-import java.util.function.Function
import java.util.regex.Pattern
-import java.util.stream.Collectors
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
@@ -89,7 +87,9 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8
}
+processResources.dependsOn 'compileOoxmlLite'
compileJava.dependsOn 'compileOoxmlLite'
+sourcesJar.dependsOn 'compileOoxmlLite'
task compileJava9(type: JavaCompile, dependsOn: 'compileJava') {
sourceCompatibility = 9
Modified: poi/trunk/poi-ooxml/build.gradle
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/build.gradle?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/build.gradle (original)
+++ poi/trunk/poi-ooxml/build.gradle Fri May 21 21:22:40 2021
@@ -73,6 +73,11 @@ dependencies {
testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.26'
testImplementation 'com.google.guava:guava:30.0-jre'
+ // prevent slf4j warnings coming from xmlsec -> slf4j-api 1.7.30 dependency
+ // see https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/
+ testImplementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.14.1'
+
+
broken "org.apache.xmlgraphics:batik-script:${batikVersion}"
javadocs project(':poi')
@@ -89,14 +94,6 @@ final String OOXML_LITE_AGENT = "../buil
final String OOXML_LITE_REPORT = '../build/ooxml-lite-report'
final String OOXML_LITE_INCLUDES = "^(com/microsoft/schemas|org/(etsi|openxmlformats|w3/)|org/apache/poi/schemas)"
-java {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
- withJavadocJar()
- withSourcesJar()
-}
-
-
compileJava {
dependsOn 'fixBatik'
}
@@ -180,11 +177,6 @@ task testJar(type: Jar, dependsOn: testC
}
}
-sourcesJar {
- destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
- exclude 'META-INF/services/**'
-}
-
// based on https://github.com/moditect/moditect-gradle-plugin/issues/12
task fixBatik(type: Zip) {
ant.mkdir(dir: "${buildDir}/brokenJars")
@@ -223,41 +215,13 @@ test {
dependsOn { testJar }
- useJUnitPlatform()
-
doFirst {
- jvmArgs = [
- '-Djava.io.tmpdir=build',
- '-DPOI.testdata.path=../test-data',
- '-Djava.awt.headless=true',
- '-Djava.locale.providers=JRE,CLDR',
- '-Duser.language=en',
- '-Duser.country=US',
- '-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl',
- "-Dversion.id=${project.version}",
- '-ea',
+ jvmArgs += [
"-javaagent:${OOXML_LITE_AGENT}=${OOXML_LITE_REPORT}|${OOXML_LITE_INCLUDES}",
-
- '-Djunit.jupiter.execution.parallel.enabled=true',
- '-Djunit.jupiter.execution.parallel.config.strategy=fixed',
- '-Djunit.jupiter.execution.parallel.config.fixed.parallelism=3'
- // -Xjit:verbose={compileStart|compileEnd},vlog=build/jit.log${no.jit.sherlock} ... if ${isIBMVM}
]
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
jvmArgs += [
- '-Dsun.reflect.debugModuleAccessChecks=true',
- '-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
- '--illegal-access=warn',
-
'--add-modules', MODULE_NAME,
-
- // see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
- // opposed to the recommendation there, it doesn't work to add ... to the dependencies
- // testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.7.1'
- // gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
- '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
- '--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
-
'--module-path', '../build/dist/maven/poi-ooxml-tests:' + files(TEST_MODULE_PATH).asPath,
]
}
@@ -267,10 +231,6 @@ test {
publishing {
publications {
POI(MavenPublication) {
- artifactId project.archivesBaseName
-
- from components.java
-
pom {
name = 'Apache POI - API based on OPC and OOXML schemas'
description = 'Apache POI - Java API To Access Microsoft Format Files'
@@ -278,5 +238,3 @@ publishing {
}
}
}
-
-generatePomFileForPOIPublication.destination = "../build/dist/maven/${project.archivesBaseName}/${project.archivesBaseName}-${project.version}.pom"
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLDocumentPart.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLDocumentPart.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLDocumentPart.java Fri May 21 21:22:40 2021
@@ -196,6 +196,7 @@ public class POIXMLDocumentPart {
* @throws IllegalStateException if there are more than one core document relations
*/
protected final void rebase(OPCPackage pkg) throws InvalidFormatException {
+ // TODO: check why pkg parameter is not used ???
PackageRelationshipCollection cores =
packagePart.getRelationshipsByType(coreDocumentRel);
if (cores.size() != 1) {
@@ -240,10 +241,10 @@ public class POIXMLDocumentPart {
}
/**
- * Returns the target {@link POIXMLDocumentPart}, where a
+ * Returns the target POIXMLDocumentPart, where a
* {@link PackageRelationship} is set from the {@link PackagePart} of this
- * {@link POIXMLDocumentPart} to the {@link PackagePart} of the target
- * {@link POIXMLDocumentPart} with a {@link PackageRelationship#getId()}
+ * POIXMLDocumentPart to the {@link PackagePart} of the target
+ * POIXMLDocumentPart with a {@link PackageRelationship#getId()}
* matching the given parameter value.
*
* @param id The relation id to look for
@@ -257,8 +258,8 @@ public class POIXMLDocumentPart {
/**
* Returns the target {@link RelationPart}, where a
* {@link PackageRelationship} is set from the {@link PackagePart} of this
- * {@link POIXMLDocumentPart} to the {@link PackagePart} of the target
- * {@link POIXMLDocumentPart} with a {@link PackageRelationship#getId()}
+ * POIXMLDocumentPart to the {@link PackagePart} of the target
+ * POIXMLDocumentPart with a {@link PackageRelationship#getId()}
* matching the given parameter value.
*
* @param id The relation id to look for
@@ -272,13 +273,13 @@ public class POIXMLDocumentPart {
/**
* Returns the first {@link PackageRelationship#getId()} of the
* {@link PackageRelationship}, that sources from the {@link PackagePart} of
- * this {@link POIXMLDocumentPart} to the {@link PackagePart} of the given
- * parameter value.<p>
+ * this POIXMLDocumentPart to the {@link PackagePart} of the given
+ * parameter value.
* <p>
- * There can be multiple references to the given {@link POIXMLDocumentPart}
+ * There can be multiple references to the given POIXMLDocumentPart
* and only the first in the order of creation is returned.
*
- * @param part The {@link POIXMLDocumentPart} for which the according
+ * @param part The POIXMLDocumentPart for which the according
* relation-id shall be found.
* @return The value of the {@link PackageRelationship#getId()} or null, if
* parts are not related.
@@ -326,7 +327,7 @@ public class POIXMLDocumentPart {
/**
* Remove the relation to the specified part in this package and remove the
- * part, if it is no longer needed.<p>
+ * part, if it is no longer needed.
* <p>
* If there are multiple relationships to the same part, this will only
* remove the first relationship in the order of creation. The removal
@@ -340,7 +341,7 @@ public class POIXMLDocumentPart {
/**
* Remove the relation to the specified part in this package and remove the
- * part, if it is no longer needed and flag is set to true.<p>
+ * part, if it is no longer needed and flag is set to true.
* <p>
* If there are multiple relationships to the same part, this will only
* remove the first relationship in the order of creation. The removal
@@ -358,7 +359,7 @@ public class POIXMLDocumentPart {
/**
* Remove the relation to the specified part in this package and remove the
- * part, if it is no longer needed.<p>
+ * part, if it is no longer needed.
* <p>
* If there are multiple relationships to the same part, this will only
* remove the first relationship in the order of creation. The removal
@@ -413,7 +414,7 @@ public class POIXMLDocumentPart {
/**
* Returns the parent POIXMLDocumentPart. All parts except root have not-null parent.
*
- * @return the parent POIXMLDocumentPart or <code>null</code> for the root element.
+ * @return the parent POIXMLDocumentPart or {@code null} for the root element.
*/
public final POIXMLDocumentPart getParent() {
return parent;
@@ -719,8 +720,8 @@ public class POIXMLDocumentPart {
/**
* Internal method, do not use!
- * <p>
- * This method only exists to allow access to protected {@link POIXMLDocumentPart#onDocumentRead()}
+ *
+ * @deprecated This method only exists to allow access to protected {@link POIXMLDocumentPart#onDocumentRead()}
* from {@link XWPFDocument} without reflection. It should be removed.
*
* @param part the part which is to be read
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/SignatureFacet.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/SignatureFacet.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/SignatureFacet.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/SignatureFacet.java Fri May 21 21:22:40 2021
@@ -60,7 +60,6 @@ public interface SignatureFacet {
* @param document the signature document to be used for imports
* @param references list of reference definitions
* @param objects objects to be signed/included in the signature document
- * @throws XMLSignatureException
*/
default void preSign(
SignatureInfo signatureInfo
@@ -78,7 +77,6 @@ public interface SignatureFacet {
*
* @param signatureInfo the signature info object holding the OPCPackage and other document related data
* @param document the signature document to be modified
- * @throws MarshalException
*/
default void postSign(SignatureInfo signatureInfo, Document document) throws MarshalException {
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RevocationData.java Fri May 21 21:22:40 2021
@@ -48,8 +48,6 @@ public class RevocationData {
/**
* Adds a CRL to this revocation data set.
- *
- * @param encodedCrl
*/
public void addCRL(byte[] encodedCrl) {
this.crls.add(encodedCrl);
@@ -57,8 +55,6 @@ public class RevocationData {
/**
* Adds a CRL to this revocation data set.
- *
- * @param crl
*/
public void addCRL(X509CRL crl) {
byte[] encodedCrl;
@@ -73,8 +69,6 @@ public class RevocationData {
/**
* Adds an OCSP response to this revocation data set.
- *
- * @param encodedOcsp
*/
public void addOCSP(byte[] encodedOcsp) {
this.ocsps.add(encodedOcsp);
@@ -99,10 +93,10 @@ public class RevocationData {
}
/**
- * Returns <code>true</code> if this revocation data set holds OCSP
+ * Returns {@code true} if this revocation data set holds OCSP
* responses.
*
- * @return <code>true</code> if this revocation data set holds OCSP
+ * @return {@code true} if this revocation data set holds OCSP
* responses.
*/
public boolean hasOCSPs() {
@@ -110,18 +104,18 @@ public class RevocationData {
}
/**
- * Returns <code>true</code> if this revocation data set holds CRLs.
+ * Returns {@code true} if this revocation data set holds CRLs.
*
- * @return <code>true</code> if this revocation data set holds CRLs.
+ * @return {@code true} if this revocation data set holds CRLs.
*/
public boolean hasCRLs() {
return !this.crls.isEmpty();
}
/**
- * Returns <code>true</code> if this revocation data is not empty.
+ * Returns {@code true} if this revocation data is not empty.
*
- * @return <code>true</code> if this revocation data is not empty.
+ * @return {@code true} if this revocation data is not empty.
*/
public boolean hasRevocationDataEntries() {
return hasOCSPs() || hasCRLs();
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampServiceValidator.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampServiceValidator.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampServiceValidator.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampServiceValidator.java Fri May 21 21:22:40 2021
@@ -35,7 +35,6 @@ public interface TimeStampServiceValidat
/**
* Validates the given certificate chain.
*
- * @param certificateChain
* @param revocationData
* the optional data container that should be filled with
* revocation data that was used to validate the given
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChart.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChart.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChart.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChart.java Fri May 21 21:22:40 2021
@@ -141,7 +141,7 @@ public abstract class XDDFChart extends
* @param part
* the package part holding the chart data, the content type must
* be
- * <code>application/vnd.openxmlformats-officedocument.drawingml.chart+xml</code>
+ * {@code application/vnd.openxmlformats-officedocument.drawingml.chart+xml}
* @since POI 3.14-Beta1
*/
protected XDDFChart(PackagePart part) throws IOException, XmlException {
@@ -411,13 +411,11 @@ public abstract class XDDFChart extends
series.plot();
XDDFDataSource<?> categoryDS = series.getCategoryData();
XDDFNumericalDataSource<? extends Number> valuesDS = series.getValuesData();
- if (categoryDS == null || valuesDS == null
- || categoryDS.isCellRange() || valuesDS.isCellRange()
- || categoryDS.isLiteral() || valuesDS.isLiteral()) {
- // let's assume the data is already in the sheet
- } else {
+ if (categoryDS != null && !categoryDS.isCellRange() && !categoryDS.isLiteral() &&
+ valuesDS != null && !valuesDS.isCellRange() && !valuesDS.isLiteral()) {
fillSheet(sheet, categoryDS, valuesDS);
}
+ // otherwise let's assume the data is already in the sheet
}
}
@@ -774,7 +772,6 @@ public abstract class XDDFChart extends
* @param chartFactory
* factory object of POIXMLFactory (XWPFFactory/XSLFFactory)
* @return return the new package part
- * @throws InvalidFormatException
* @since POI 4.0.0
*/
private PackagePart createWorksheetPart(POIXMLRelation chartWorkbookRelation, POIXMLFactory chartFactory)
@@ -787,10 +784,7 @@ public abstract class XDDFChart extends
/**
* this method write the XSSFWorkbook object data into embedded excel file
*
- * @param workbook
- * XSSFworkbook object
- * @throws IOException
- * @throws InvalidFormatException
+ * @param workbook XSSFworkbook object
* @since POI 4.0.0
*/
public void saveWorkbook(XSSFWorkbook workbook) throws IOException, InvalidFormatException {
@@ -953,8 +947,6 @@ public abstract class XDDFChart extends
}
/**
- * @param range
- * @return
* @since POI 4.0.0
*/
public String formatRange(CellRangeAddress range) {
@@ -969,12 +961,11 @@ public abstract class XDDFChart extends
* @since POI 4.0.0
*/
private XSSFSheet getSheet() {
- XSSFSheet sheet = null;
try {
- sheet = getWorkbook().getSheetAt(0);
- } catch (InvalidFormatException | IOException ife) {
+ return getWorkbook().getSheetAt(0);
+ } catch (InvalidFormatException | IOException ignored) {
+ return null;
}
- return sheet;
}
/**
@@ -983,7 +974,6 @@ public abstract class XDDFChart extends
* writing xssfworkbook object into output stream of embedded part
*
* @return returns the packagepart of embedded file
- * @throws InvalidFormatException
* @since POI 4.0.0
*/
private PackagePart getWorksheetPart() throws InvalidFormatException {
@@ -1006,8 +996,6 @@ public abstract class XDDFChart extends
/**
* @return returns the workbook object of embedded excel file
- * @throws IOException
- * @throws InvalidFormatException
* @since POI 4.0.0
*/
public XSSFWorkbook getWorkbook() throws IOException, InvalidFormatException {
@@ -1087,8 +1075,8 @@ public abstract class XDDFChart extends
public void replaceReferences(XSSFSheet newSheet) {
for (XDDFChartData data : getChartSeries()) {
for (XDDFChartData.Series series : data.series) {
- XDDFDataSource newCategory = series.categoryData;
- XDDFNumericalDataSource newValues = series.valuesData;
+ XDDFDataSource<?> newCategory = series.categoryData;
+ XDDFNumericalDataSource<? extends Number> newValues = series.valuesData;
try {
if (series.categoryData != null && series.categoryData.isReference()) {
String ref = series.categoryData.getDataRangeReference();
@@ -1097,7 +1085,7 @@ public abstract class XDDFChart extends
? XDDFDataSourcesFactory.fromNumericCellRange(newSheet, rangeAddress)
: XDDFDataSourcesFactory.fromStringCellRange(newSheet, rangeAddress);
if (newCategory.isNumeric()) {
- ((XDDFNumericalDataSource) newCategory).setFormatCode(series.categoryData.getFormatCode());
+ ((XDDFNumericalDataSource<? extends Number>) newCategory).setFormatCode(series.categoryData.getFormatCode());
}
}
if (series.valuesData!= null && series.valuesData.isReference()) {
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java Fri May 21 21:22:40 2021
@@ -26,6 +26,7 @@ import java.util.Map;
import org.apache.poi.ss.util.CellReference;
import org.apache.poi.util.Beta;
import org.apache.poi.util.Internal;
+import org.apache.poi.util.Removal;
import org.apache.poi.xddf.usermodel.XDDFFillProperties;
import org.apache.poi.xddf.usermodel.XDDFLineProperties;
import org.apache.poi.xddf.usermodel.XDDFShapeProperties;
@@ -81,7 +82,7 @@ public abstract class XDDFChartData {
}
/**
- * Calls to <code>getSeries().add(series)</code> or to <code>getSeries().remove(series)</code>
+ * Calls to {@code getSeries().add(series)} or to {@code getSeries().remove(series)}
* may corrupt the workbook.
*
* <p>
@@ -94,9 +95,9 @@ public abstract class XDDFChartData {
* </ul>
*
* @deprecated since POI 4.1.1
- * @return
*/
@Deprecated
+ @Removal(version = "5.3")
public List<Series> getSeries() {
return Collections.unmodifiableList(series);
}
@@ -119,18 +120,15 @@ public abstract class XDDFChartData {
}
/**
- * This method should be implemented in every class that extends <code>XDDFChartData</code>.
+ * This method should be implemented in every class that extends {@code XDDFChartData}.
* <p>
* A typical implementation would be
*
- * <pre><code>
- protected void removeCTSeries(int n) {
- chart.removeSer(n);
- }
-
- * </code></pre>
- *
- * @param n
+ * <pre>{@code
+ * protected void removeCTSeries(int n) {
+ * chart.removeSer(n);
+ * }
+ * }</pre>
*/
@Internal
protected abstract void removeCTSeries(int n);
@@ -195,7 +193,7 @@ public abstract class XDDFChartData {
}
if (cache.sizeOfPtArray() < 1) {
cache.addNewPtCount().setVal(1);
- cache.addNewPt().setIdx(0);;
+ cache.addNewPt().setIdx(0);
}
cache.getPtArray(0).setV(title);
}
@@ -255,7 +253,7 @@ public abstract class XDDFChartData {
}
/**
- * If a data point definition with the given <code>index</code> exists, then remove it.
+ * If a data point definition with the given {@code index} exists, then remove it.
* Otherwise do nothing.
*
* @param index
@@ -267,19 +265,19 @@ public abstract class XDDFChartData {
for (int i = 0; i < points.size(); i++) {
if (points.get(i).getIdx().getVal() == index) {
points.remove(i);
- i = points.size();
+ break;
}
}
}
/**
- * If a data point definition with the given <code>index</code> exists, then return it.
+ * If a data point definition with the given {@code index} exists, then return it.
* Otherwise create a new data point definition and return it.
*
* @param index
* data point index.
* @return
- * the data point with the given <code>index</code>.
+ * the data point with the given {@code index}.
* @since POI 5.0.1
*/
public XDDFDataPoint getDataPoint(long index) {
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/text/XDDFTextRun.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/text/XDDFTextRun.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/text/XDDFTextRun.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/text/XDDFTextRun.java Fri May 21 21:22:40 2021
@@ -48,7 +48,7 @@ import org.openxmlformats.schemas.drawin
@Beta
public class XDDFTextRun {
- private XDDFTextParagraph _parent;
+ private final XDDFTextParagraph _parent;
private XDDFRunProperties _properties;
private CTTextLineBreak _tlb;
private CTTextField _tf;
@@ -320,9 +320,6 @@ public class XDDFTextRun {
* <p>
* The size is specified using a percentage.
* Positive values indicate superscript, negative values indicate subscript.
- * </p>
- *
- * @param offset
*/
public void setBaseline(Double offset) {
if (offset == null) {
@@ -336,9 +333,6 @@ public class XDDFTextRun {
* Set whether the text in this run is formatted as superscript.
* <p>
* The size is specified using a percentage.
- * </p>
- *
- * @param offset
*/
public void setSuperscript(Double offset) {
setBaseline(offset == null ? null : Math.abs(offset));
@@ -348,9 +342,6 @@ public class XDDFTextRun {
* Set whether the text in this run is formatted as subscript.
* <p>
* The size is specified using a percentage.
- * </p>
- *
- * @param offset
*/
public void setSubscript(Double offset) {
setBaseline(offset == null ? null : -Math.abs(offset));
@@ -407,7 +398,7 @@ public class XDDFTextRun {
/**
* @param size
- * font size in points. The value <code>null</code> unsets the
+ * font size in points. The value {@code null} unsets the
* size for this run.
* <dl>
* <dt>Minimum inclusive =</dt>
@@ -432,7 +423,7 @@ public class XDDFTextRun {
/**
* Set the kerning of characters within a text run.
* <p>
- * The value <code>null</code> unsets the kerning for this run.
+ * The value {@code null} unsets the kerning for this run.
* </p>
*
* @param kerning
@@ -451,7 +442,7 @@ public class XDDFTextRun {
/**
*
* @return the kerning of characters within a text run,
- * If this attribute is omitted then returns <code>null</code>.
+ * If this attribute is omitted then returns {@code null}.
*/
public Double getCharacterKerning() {
return findDefinedProperty(
@@ -468,7 +459,7 @@ public class XDDFTextRun {
* negative values to condense.
* </p>
* <p>
- * The value <code>null</code> unsets the spacing for this run.
+ * The value {@code null} unsets the spacing for this run.
* </p>
*
* @param spacing
@@ -487,7 +478,7 @@ public class XDDFTextRun {
/**
*
* @return the spacing between characters within a text run,
- * If this attribute is omitted then returns <code>null</code>.
+ * If this attribute is omitted then returns {@code null}.
*/
public Double getCharacterSpacing() {
return findDefinedProperty(
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java Fri May 21 21:22:40 2021
@@ -21,13 +21,10 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
-import java.util.Set;
import java.util.SortedMap;
/**
* An iterator used to iterate over the base and master items
- *
- * @param <T>
*/
public class CombinedIterable<T> implements Iterable<T> {
@@ -43,14 +40,8 @@ public class CombinedIterable<T> impleme
@Override
public Iterator<T> iterator() {
- final Iterator<Entry<Long, T>> vmasterI;
-
- if (_masterItems != null) {
- vmasterI = _masterItems.entrySet().iterator();
- } else {
- final Set<Entry<Long, T>> empty = Collections.emptySet();
- vmasterI = empty.iterator();
- }
+ final Iterator<Entry<Long, T>> vmasterI = (_masterItems == null)
+ ? Collections.emptyIterator() : _masterItems.entrySet().iterator();
return new Iterator<T>() {
@@ -60,8 +51,8 @@ public class CombinedIterable<T> impleme
Entry<Long, T> currentMaster;
// grab the iterator for both
- Iterator<Entry<Long, T>> baseI = _baseItems.entrySet().iterator();
- Iterator<Entry<Long, T>> masterI = vmasterI;
+ final Iterator<Entry<Long, T>> baseI = _baseItems.entrySet().iterator();
+ final Iterator<Entry<Long, T>> masterI = vmasterI;
@Override
public boolean hasNext() {
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFShape.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFShape.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFShape.java Fri May 21 21:22:40 2021
@@ -315,7 +315,7 @@ public abstract class XSLFShape implemen
/**
* Walk up the inheritance tree and fetch shape properties.<p>
*
- * The following order of inheritance is assumed:<p>
+ * The following order of inheritance is assumed:
* <ol>
* <li>slide
* <li>slideLayout
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/model/ThemesTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/model/ThemesTable.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/model/ThemesTable.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/model/ThemesTable.java Fri May 21 21:22:40 2021
@@ -49,12 +49,12 @@ public class ThemesTable extends POIXMLD
HLINK(10,"Hlink"),
FOLHLINK(11,"FolHlink"),
UNKNOWN(-1,null);
-
+
public static ThemeElement byId(int idx) {
if (idx >= values().length || idx < 0) return UNKNOWN;
return values()[idx];
}
- private ThemeElement(int idx, String name) {
+ ThemeElement(int idx, String name) {
this.idx = idx; this.name = name;
}
public final int idx;
@@ -62,7 +62,7 @@ public class ThemesTable extends POIXMLD
}
private IndexedColorMap colorMap;
- private ThemeDocument theme;
+ private final ThemeDocument theme;
/**
* Create a new, empty ThemesTable
@@ -72,23 +72,23 @@ public class ThemesTable extends POIXMLD
theme = ThemeDocument.Factory.newInstance();
theme.addNewTheme().addNewThemeElements();
}
-
+
/**
* Construct a ThemesTable.
* @param part A PackagePart.
- *
+ *
* @since POI 3.14-Beta1
*/
public ThemesTable(PackagePart part) throws IOException {
super(part);
-
+
try {
theme = ThemeDocument.Factory.parse(part.getInputStream(), DEFAULT_XML_OPTIONS);
} catch(XmlException e) {
throw new IOException(e.getLocalizedMessage(), e);
}
}
-
+
/**
* Construct a ThemesTable from an existing ThemeDocument.
* @param theme A ThemeDocument.
@@ -99,12 +99,11 @@ public class ThemesTable extends POIXMLD
/**
* called from {@link StylesTable} when setting theme, used to adjust colors if a custom indexed mapping is defined
- * @param colorMap
*/
protected void setColorMap(IndexedColorMap colorMap) {
this.colorMap = colorMap;
}
-
+
/**
* Convert a theme "index" (as used by fonts etc) into a color.
* @param idx A theme "index"
@@ -133,7 +132,7 @@ public class ThemesTable extends POIXMLD
default: return null;
}
- byte[] rgb = null;
+ byte[] rgb;
if (ctColor.isSetSrgbClr()) {
// Color is a regular one
rgb = ctColor.getSrgbClr().getVal();
@@ -143,9 +142,9 @@ public class ThemesTable extends POIXMLD
} else {
return null;
}
- return new XSSFColor(rgb, colorMap);
+ return new XSSFColor(rgb, colorMap);
}
-
+
/**
* If the colour is based on a theme, then inherit
* information (currently just colours) from it as
@@ -170,10 +169,10 @@ public class ThemesTable extends POIXMLD
// All done
}
-
+
/**
* Write this table out as XML.
- *
+ *
* @param out The stream to write to.
* @throws IOException if an error occurs while writing.
*/
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFEvaluationSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFEvaluationSheet.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFEvaluationSheet.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFEvaluationSheet.java Fri May 21 21:22:40 2021
@@ -49,6 +49,7 @@ final class SXSSFEvaluationSheet impleme
* @see org.apache.poi.ss.formula.EvaluationSheet#isRowHidden(int)
* @since POI 4.1.0
*/
+ @Override
public boolean isRowHidden(int rowIndex) {
SXSSFRow row = _xs.getRow(rowIndex);
if (row == null) return false;
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java Fri May 21 21:22:40 2021
@@ -47,10 +47,11 @@ public abstract class BaseXSSFFormulaEva
* Turns a XSSFCell / SXSSFCell into a XSSFEvaluationCell
*/
protected abstract EvaluationCell toEvaluationCell(Cell cell);
-
+
/**
* Returns a CellValue wrapper around the supplied ValueEval instance.
*/
+ @Override
protected CellValue evaluateFormulaCellValue(Cell cell) {
EvaluationCell evalCell = toEvaluationCell(cell);
ValueEval eval = _bookEvaluator.evaluate(evalCell);
@@ -71,7 +72,8 @@ public abstract class BaseXSSFFormulaEva
}
throw new RuntimeException("Unexpected eval class (" + eval.getClass().getName() + ")");
}
-
+
+ @Override
protected void setCellType(Cell cell, CellType cellType) {
if (cell instanceof XSSFCell) {
EvaluationWorkbook evaluationWorkbook = getEvaluationWorkbook();
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/DefaultIndexedColorMap.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/DefaultIndexedColorMap.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/DefaultIndexedColorMap.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/DefaultIndexedColorMap.java Fri May 21 21:22:40 2021
@@ -23,15 +23,12 @@ import org.apache.poi.hssf.util.HSSFColo
*/
public class DefaultIndexedColorMap implements IndexedColorMap {
- /**
- * @see org.apache.poi.xssf.usermodel.IndexedColorMap#getRGB(int)
- */
+ @Override
public byte[] getRGB(int index) {
return getDefaultRGB(index);
}
/**
- * @param index
* @return RGB bytes from HSSF default color by index
*/
public static byte[] getDefaultRGB(int index) {
Modified: poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java?rev=1890089&r1=1890088&r2=1890089&view=diff
==============================================================================
--- poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java (original)
+++ poi/trunk/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFBuiltinTableStyle.java Fri May 21 21:22:40 2021
@@ -18,7 +18,6 @@
package org.apache.poi.xssf.usermodel;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.EnumMap;
@@ -343,7 +342,7 @@ public enum XSSFBuiltinTableStyle {
*/
private static final Map<XSSFBuiltinTableStyle, TableStyle> styleMap = new EnumMap<>(XSSFBuiltinTableStyle.class);
- private XSSFBuiltinTableStyle() {
+ XSSFBuiltinTableStyle() {
}
/**
@@ -357,7 +356,6 @@ public enum XSSFBuiltinTableStyle {
/**
* NOTE: only checks by name, not definition.
*
- * @param style
* @return true if the style represents a built-in style, false if it is null or a custom style
*/
public static boolean isBuiltinStyle(TableStyle style) {
@@ -423,22 +421,20 @@ public enum XSSFBuiltinTableStyle {
}
}
- private static String styleXML(Node dxfsNode, Node tableStyleNode) throws IOException, TransformerException {
+ private static String styleXML(Node dxfsNode, Node tableStyleNode) throws TransformerException {
// built-ins doc uses 1-based dxf indexing, Excel uses 0 based.
// add a dummy node to adjust properly.
dxfsNode.insertBefore(dxfsNode.getOwnerDocument().createElement("dxf"), dxfsNode.getFirstChild());
- StringBuilder sb = new StringBuilder(1024);
- sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n")
- .append("<styleSheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" ")
- .append("xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" ")
- .append("xmlns:x14ac=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac\" ")
- .append("xmlns:x16r2=\"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main\" ")
- .append("mc:Ignorable=\"x14ac x16r2\">\n");
- sb.append(writeToString(dxfsNode));
- sb.append(writeToString(tableStyleNode));
- sb.append("</styleSheet>");
- return sb.toString();
+ return "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
+ "<styleSheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" " +
+ "xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" " +
+ "xmlns:x14ac=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac\" " +
+ "xmlns:x16r2=\"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main\" " +
+ "mc:Ignorable=\"x14ac x16r2\">\n" +
+ writeToString(dxfsNode) +
+ writeToString(tableStyleNode) +
+ "</styleSheet>";
}
private static String writeToString(Node node) throws TransformerException {
@@ -458,27 +454,27 @@ public enum XSSFBuiltinTableStyle {
private final XSSFBuiltinTableStyle builtIn;
private final TableStyle style;
- /**
- * @param builtIn
- * @param style
- */
protected XSSFBuiltinTypeStyleStyle(XSSFBuiltinTableStyle builtIn, TableStyle style) {
this.builtIn = builtIn;
this.style = style;
}
+ @Override
public String getName() {
return style.getName();
}
+ @Override
public int getIndex() {
return builtIn.ordinal();
}
+ @Override
public boolean isBuiltin() {
return true;
}
+ @Override
public DifferentialStyleProvider getStyle(TableStyleType type) {
return style.getStyle(type);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org