https://bz.apache.org/bugzilla/show_bug.cgi?id=65946

            Bug ID: 65946
           Summary: POIXMLPropertiesTextExtractor returns duplicate key
                    for Core properties
           Product: POI
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 38224
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38224&action=edit
You can use this pptx to reproduce

## Issue

The POIXMLPropertiesTextExtractor::getCorePropertiesText() method returns a
duplicate key "Category".

Check this line of Code:
https://github.com/apache/poi/blob/b6aee1ef6d3e92a28ffd4b5c03e677b63b43747f/poi-ooxml/src/main/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java#L115


## To reproduce: 

1. Create a new pptx file in Powerpoint. 
2. Add a category metadata to the pptx in Powerpoint (File > Properties >
Summary > Enter a value in Category)
3. Read the ppt in POI and print the metadata as such -> 
 ```

        FileInputStream stream = new FileInputStream(new File("myfile.pptx"));

        XMLSlideShow doc = new XMLSlideShow(stream);
        SlideShowExtractor<XSLFShape, XSLFTextParagraph> extractor = new
SlideShowExtractor<>(doc);
        String metaText = extractor.getMetadataTextExtractor().getText();
        System.out.println(metaText);
 ```
4. Observe the duplicate "Category" value

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to