You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/01/17 12:44:53 UTC

Re: [PR] Fix Bug 69855 bug: Ensure at least one paragraph for OOXML compliance [poi]

pjfanning commented on code in PR #999:
URL: https://github.com/apache/poi/pull/999#discussion_r2701064312


##########
poi-ooxml/src/test/java/org/apache/poi/xslf/TestXSLFBugs.java:
##########
@@ -236,7 +236,7 @@ void bug61589() throws IOException {
             try (XMLSlideShow ppt3 = writeOutAndReadBack(dest)) {
                 XSLFSlide slide3 = ppt3.getSlides().get(0);
                 XSLFTextBox shape3 = (XSLFTextBox) slide3.getShapes().get(0);
-                XSLFTextParagraph p3 = shape3.getTextParagraphs().get(1);
+                XSLFTextParagraph p3 = shape3.getTextParagraphs().get(2);

Review Comment:
   Why is there is an extra paragraph here? the test doesn't seem to manipulate the text.
   If we are going to modify the behaviour, we should check the 0 and 1 paragraphs to see that we don't duplicate the paragraphs by accident.
   
   I'm not convinced that the other test changes are valid either. It seems like we are hacking the tests instead of improving the tests.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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