[
https://issues.apache.org/jira/browse/TIKA-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14502776#comment-14502776
]
Tim Allison commented on TIKA-1501:
-----------------------------------
Ah, ok. This is the first time I've really looked at this code, and I frankly
wouldn't touch this portion of the code without an OSGi expert collaborating
with us!
I think the expectation is: there should be the same detectors both inside and
outside the OSGi environment.
I think what I found is that there is a very slight difference in structure,
but that the same detectors exist both inside and outside.
So, it looks like our comments and variable names are backwards?
This:
{noformat}
// Get the classes found within OSGi
DefaultDetector detector = new DefaultDetector();
Set<String> osgiDetectors = new HashSet<String>();
{noformat}
should be:
{noformat}
// Get the classes found by normal means outside of the OSGi bundle
DefaultDetector detector = new DefaultDetector();
Set<String> rawDetectors = new HashSet<String>();
{noformat}
Unless I misunderstand, the DefaultDetector is picking up the following via the
regular service mechanism+classpath (outside of OSGi):
{noformat}
org.apache.tika.parser.microsoft.POIFSContainerDetector
org.apache.tika.parser.pkg.ZipContainerDetector
{noformat}
So, this passes (after I prevent the addition of the child DefaultDetector):
{noformat}
assertEquals(osgiDetectors.size(), rawDetectors.size());
{noformat}
> Fix the disabled Tika Bundle OSGi related unit tests
> ----------------------------------------------------
>
> Key: TIKA-1501
> URL: https://issues.apache.org/jira/browse/TIKA-1501
> Project: Tika
> Issue Type: Improvement
> Components: packaging
> Affects Versions: 1.6, 1.7
> Reporter: Nick Burch
> Attachments: TIKA-1501-trunk.patch, TIKA-1501-trunkv2.patch,
> TIKA-1501.patch
>
>
> Currently, the unit tests for the Tika Bundle contain several bits like:
> {code}
> @Ignore // TODO Fix this test
> {code}
> We should really fix these unit tests so they work, and re-enable them
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)