See 
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/855/display/redirect?page=changes>

Changes:

[PJ Fanning] add test

[Dominik Stadler] Bug 69667: Handle slightly broken WriteAccessRecord gracefully

It seems some software creates records with invalid length.

If it uses UTF-16LE encoding, we can end up with 109 bytes, 
which is invalid as UTF-16LE always requires an even number of 
bytes.

Therefor we now sanitize the number of bytes we read from the 
record to avoid this issue.

Also improve error message and add tests


------------------------------------------
[...truncated 55.77 KiB...]
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/BaseTestCellUtil.java>:319:
 warning: [deprecation] BORDER_RIGHT in CellUtil has been deprecated
            props.put(CellUtil.BORDER_RIGHT, BorderStyle.THIN);
                              ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/BaseTestCellUtil.java>:320:
 warning: [deprecation] ALIGNMENT in CellUtil has been deprecated
            props.put(CellUtil.ALIGNMENT, 
HorizontalAlignment.CENTER.getCode()); // try it both with a Short (deprecated)
                              ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/BaseTestCellUtil.java>:321:
 warning: [deprecation] VERTICAL_ALIGNMENT in CellUtil has been deprecated
            props.put(CellUtil.VERTICAL_ALIGNMENT, VerticalAlignment.CENTER); 
// and with an enum
                              ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/BaseTestCellUtil.java>:322:
 warning: [deprecation] setCellStyleProperties(Cell,Map<String,Object>) in 
CellUtil has been deprecated
            CellUtil.setCellStyleProperties(c, props);
                    ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/BaseTestCellUtil.java>:328:
 warning: [deprecation] setCellStyleProperties(Cell,Map<String,Object>) in 
CellUtil has been deprecated
            CellUtil.setCellStyleProperties(c, props);
                    ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/BaseTestCellUtil.java>:601:
 warning: [deprecation] FILL_PATTERN in CellUtil has been deprecated
            properties.put(CellUtil.FILL_PATTERN, FillPatternType.BRICKS);
                                   ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/BaseTestCellUtil.java>:602:
 warning: [deprecation] FILL_FOREGROUND_COLOR in CellUtil has been deprecated
            properties.put(CellUtil.FILL_FOREGROUND_COLOR, 
IndexedColors.BLUE.index);
                                   ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/BaseTestCellUtil.java>:603:
 warning: [deprecation] FILL_BACKGROUND_COLOR in CellUtil has been deprecated
            properties.put(CellUtil.FILL_BACKGROUND_COLOR, 
IndexedColors.RED.index);
                                   ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/BaseTestCellUtil.java>:605:
 warning: [deprecation] setCellStyleProperties(Cell,Map<String,Object>) in 
CellUtil has been deprecated
            CellUtil.setCellStyleProperties(A1, properties);
                    ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:91:
 warning: [deprecation] BORDER_TOP in CellUtil has been deprecated
                pt.getBorderStyle(0, 0, CellUtil.BORDER_TOP));
                                                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:91:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                pt.getBorderStyle(0, 0, CellUtil.BORDER_TOP));
                  ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:94:
 warning: [deprecation] BORDER_BOTTOM in CellUtil has been deprecated
                pt.getBorderStyle(0, 0, CellUtil.BORDER_BOTTOM));
                                                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:94:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                pt.getBorderStyle(0, 0, CellUtil.BORDER_BOTTOM));
                  ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:97:
 warning: [deprecation] TOP_BORDER_COLOR in CellUtil has been deprecated
                pt.getTemplateProperty(0, 0, CellUtil.TOP_BORDER_COLOR));
                                                     ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:97:
 warning: [deprecation] getTemplateProperty(int,int,String) in PropertyTemplate 
has been deprecated
                pt.getTemplateProperty(0, 0, CellUtil.TOP_BORDER_COLOR));
                  ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:100:
 warning: [deprecation] BOTTOM_BORDER_COLOR in CellUtil has been deprecated
                pt.getTemplateProperty(0, 0, CellUtil.BOTTOM_BORDER_COLOR));
                                                     ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:100:
 warning: [deprecation] getTemplateProperty(int,int,String) in PropertyTemplate 
has been deprecated
                pt.getTemplateProperty(0, 0, CellUtil.BOTTOM_BORDER_COLOR));
                  ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:440:
 warning: [deprecation] BORDER_TOP in CellUtil has been deprecated
                        pt.getBorderStyle(i, j, CellUtil.BORDER_TOP));
                                                        ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:440:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                        pt.getBorderStyle(i, j, CellUtil.BORDER_TOP));
                          ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:442:
 warning: [deprecation] BORDER_BOTTOM in CellUtil has been deprecated
                        pt.getBorderStyle(i, j, CellUtil.BORDER_BOTTOM));
                                                        ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:442:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                        pt.getBorderStyle(i, j, CellUtil.BORDER_BOTTOM));
                          ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:444:
 warning: [deprecation] BORDER_LEFT in CellUtil has been deprecated
                        pt.getBorderStyle(i, j, CellUtil.BORDER_LEFT));
                                                        ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:444:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                        pt.getBorderStyle(i, j, CellUtil.BORDER_LEFT));
                          ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:446:
 warning: [deprecation] BORDER_RIGHT in CellUtil has been deprecated
                        pt.getBorderStyle(i, j, CellUtil.BORDER_RIGHT));
                                                        ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:446:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                        pt.getBorderStyle(i, j, CellUtil.BORDER_RIGHT));
                          ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:458:
 warning: [deprecation] BORDER_TOP in CellUtil has been deprecated
                                        CellUtil.BORDER_TOP));
                                                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:457:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                                pt.getBorderStyle(i, j,
                                  ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:461:
 warning: [deprecation] BORDER_BOTTOM in CellUtil has been deprecated
                                        CellUtil.BORDER_BOTTOM));
                                                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:460:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                                pt.getBorderStyle(i, j,
                                  ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:464:
 warning: [deprecation] BORDER_LEFT in CellUtil has been deprecated
                                        CellUtil.BORDER_LEFT));
                                                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:463:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                                pt.getBorderStyle(i, j,
                                  ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:467:
 warning: [deprecation] BORDER_RIGHT in CellUtil has been deprecated
                                        CellUtil.BORDER_RIGHT));
                                                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:466:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                                pt.getBorderStyle(i, j,
                                  ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:471:
 warning: [deprecation] BORDER_TOP in CellUtil has been deprecated
                                        CellUtil.BORDER_TOP));
                                                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:470:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                                pt.getBorderStyle(i, j,
                                  ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:474:
 warning: [deprecation] BORDER_BOTTOM in CellUtil has been deprecated
                                        CellUtil.BORDER_BOTTOM));
                                                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>:473:
 warning: [deprecation] getBorderStyle(int,int,String) in PropertyTemplate has 
been deprecated
                                pt.getBorderStyle(i, j,
                                  ^
Note: 
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/test/java/org/apache/poi/ss/util/TestPropertyTemplate.java>
 has additional uses or overrides of a deprecated API.
100 warnings

> Task :poi-ooxml-full:getDeps
> Task :poi-ooxml-full:jacocoTestReport SKIPPED
> Task :poi:compileTest9 FROM-CACHE
> Task :poi:jar
> Task :poi:processTestResources
> Task :poi:testClasses
> Task :poi-ooxml:compileJava9 FROM-CACHE
> Task :poi-ooxml:classes
> Task :poi-ooxml:jar
> Task :poi-excelant:compileJava FROM-CACHE
> Task :poi-scratchpad:compileJava FROM-CACHE
> Task :poi-scratchpad:compileJava9 FROM-CACHE
> Task :poi-scratchpad:classes
> Task :poi:testJar
> Task :poi-scratchpad:jar
> Task :poi-excelant:compileJava9 FROM-CACHE
> Task :poi-excelant:classes
> Task :poi-excelant:jar
> Task :poi-examples:compileJava FROM-CACHE
> Task :poi-examples:compileJava9 FROM-CACHE
> Task :poi-examples:classes UP-TO-DATE
> Task :poi-examples:jar

> Task :poi-ooxml:javadoc
error: error reading 
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/build/dist/maven/poi-scratchpad/poi-scratchpad-5.4.2-SNAPSHOT.jar;>
 zip END header not found
1 error

> Task :poi-ooxml:javadoc FAILED

> Task :poi-scratchpad:compileTestJava
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/model/TestCHPBinTable.java>:53:
 warning: [deprecation] writeTo(HWPFFileSystem,int,CharIndexTranslator) in 
CHPBinTable has been deprecated
    _cHPBinTable.writeTo(fileSys, 0, fakeTPT);
                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/model/TestFontTable.java>:47:
 warning: [deprecation] writeTo(HWPFFileSystem) in FontTable has been deprecated
    _fontTable.writeTo(fileSys);
              ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/model/TestSectionTable.java>:50:
 warning: [deprecation] writeTo(HWPFFileSystem,int) in SectionTable has been 
deprecated
    sectionTable.writeTo(fileSys, 0);
                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestBug49820.java>:64:
 warning: [deprecation] getParagraphStyle(int) in StyleSheet has been deprecated
    assertEquals(expectedStyleLvl, 
styleSheet.getParagraphStyle(par.getStyleIndex()).getLvl());
                                             ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestHWPFOldDocument.java>:186:
 warning: [deprecation] getParagraphText() in Word6Extractor has been deprecated
        for (String p : ex.getParagraphText()) {
                          ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestHWPFOldDocument.java>:203:
 warning: [deprecation] getParagraphText() in Word6Extractor has been deprecated
        for (String p : ex.getParagraphText()) {
                          ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/usermodel/TestHWPFOldDocument.java>:240:
 warning: [deprecation] getParagraphText() in Word6Extractor has been deprecated
        for (String p : ex.getParagraphText()) {
                          ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractorBugs.java>:56:
 warning: [deprecation] getParagraphText() in Word6Extractor has been deprecated
                assertNotNull(extractor.getParagraphText());
                                       ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java>:190:
 warning: [deprecation] getHeaderText() in WordExtractor has been deprecated
        assertEquals("First header column!\tMid header Right header!\n", 
extractor1.getHeaderText());
                                                                                
   ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java>:200:
 warning: [deprecation] getHeaderText() in WordExtractor has been deprecated
        assertEquals("This is a simple header, with a \u20ac euro symbol in 
it.\n\n", extractor2.getHeaderText());
                                                                                
                ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java>:213:
 warning: [deprecation] getFooterText() in WordExtractor has been deprecated
        assertEquals("Footer Left\tFooter Middle Footer Right\n", 
extractor1.getFooterText());
                                                                            ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java>:223:
 warning: [deprecation] getFooterText() in WordExtractor has been deprecated
        assertEquals("The footer, with Moli\u00e8re, has Unicode in it.\n", 
extractor2.getFooterText());
                                                                                
      ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/sprm/TestSprms.java>:77:
 warning: [deprecation] getParagraphStyle(int) in StyleSheet has been deprecated
            assertEquals(1, 
hwpfDocument.getStyleSheet().getParagraphStyle(8).getJustification());
                                                        ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hwpf/sprm/TestSprms.java>:80:
 warning: [deprecation] getParagraphStyle(int) in StyleSheet has been deprecated
                assertEquals(1, 
hwpfDocument2.getStyleSheet().getParagraphStyle(8).getJustification());
                                                             ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-scratchpad/src/test/java/org/apache/poi/hslf/extractor/TestExtractor.java>:498:
 warning: [deprecation] getCodepoints(String,Boolean,Boolean) in 
SlideShowExtractor has been deprecated
                BitSet l1 = ppt.getCodepoints(font, null, null);
                               ^

> Task :poi-excelant:javadoc
warning: URL https://docs.oracle.com/javase/8/docs/api/element-list was 
redirected to https://docs.oracle.com/en/java/javase/24/ -- Update the 
command-line options to suppress this warning.
1 warning

> Task :poi:javadoc
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java>:22:
 warning: [removal] AccessControlException in java.security has been deprecated 
and marked for removal
import java.security.AccessControlException;
                    ^
<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi/src/main/java/org/apache/poi/poifs/nio/CleanerUtil.java>:29:
 warning: [removal] AccessController in java.security has been deprecated and 
marked for removal
import java.security.AccessController;
                    ^

> Task :poi-scratchpad:compileTestJava
15 warnings

> Task :poi-examples:javadoc
warning: URL https://docs.oracle.com/javase/8/docs/api/element-list was 
redirected to https://docs.oracle.com/en/java/javase/24/ -- Update the 
command-line options to suppress this warning.
1 warning

> Task :poi:javadoc
warning: URL https://docs.oracle.com/javase/8/docs/api/element-list was 
redirected to https://docs.oracle.com/en/java/javase/24/ -- Update the 
command-line options to suppress this warning.

> Task :poi-ooxml-lite:compileJava

> Task :poi:javadoc
3 warnings

[Incubating] Problems report is available at: 
file://<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/build/reports/problems/problems-report.html>

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':poi-ooxml:javadoc'.
> Javadoc generation failed. Generated Javadoc options file (useful for 
> troubleshooting): 
> '<https://ci-builds.apache.org/job/POI/job/POI-DSL-1.17/ws/poi-ooxml/build/tmp/javadoc/javadoc.options'>

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with 
Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings 
and determine if they come from your own scripts or plugins.

For more on this, please refer to 
https://docs.gradle.org/8.14/userguide/command_line_interface.html#sec:command_line_warnings
 in the Gradle documentation.

BUILD FAILED in 3m 12s
69 actionable tasks: 51 executed, 14 from cache, 4 up-to-date
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
[SpotBugs] Skipping execution of recorder since overall result is 'FAILURE'
ERROR: Not all environment variables could be successfully injected. Check for 
similarly-named environment variables.
Archiving artifacts
ERROR: Not all environment variables could be successfully injected. Check for 
similarly-named environment variables.
Recording test results
ERROR: Not all environment variables could be successfully injected. Check for 
similarly-named environment variables.
ERROR: Step ‘Publish JUnit test result report’ failed: No test report files 
were found. Configuration error?
ERROR: Not all environment variables could be successfully injected. Check for 
similarly-named environment variables.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to