You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by "Hans Brende (JIRA)" <ji...@apache.org> on 2018/04/13 01:43:00 UTC

[jira] [Commented] (ANY23-188) NPE when ICBMExtractor#getDescription()#getExtractorLabel() called

    [ https://issues.apache.org/jira/browse/ANY23-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436660#comment-16436660 ] 

Hans Brende commented on ANY23-188:
-----------------------------------

[~lewismc] I am unable to reproduce this bug. I tried the code:

{code:java}
    for (Iterator<ExtractorFactory<?>> it = ExtractorRegistryImpl.getInstance().getExtractorGroup().iterator(); it.hasNext();) {
            ExtractorFactory fac = it.next();
            Extractor extractor = fac.createExtractor();
            System.out.println(extractor.getDescription().getExtractorName() + "   " + extractor.getDescription().getExtractorLabel());
    }
{code}

and the ICBMExtractor worked fine. I also examined the ICBMExtractor source code, and there doesn't seem to be any possible way that {{getDescription()}} can return null. Marking this issue as "Resolved -- Cannot Reproduce". But please re-open if I've overlooked something.


> NPE when ICBMExtractor#getDescription()#getExtractorLabel() called 
> -------------------------------------------------------------------
>
>                 Key: ANY23-188
>                 URL: https://issues.apache.org/jira/browse/ANY23-188
>             Project: Apache Any23
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.9.0
>            Reporter: Lewis John McGibbney
>            Priority: Major
>             Fix For: 2.3
>
>
> You can reproduce this 
> If you call the following code
>     List<Extractor> extractors = eReport.getMatchingExtractors();
>     
>     if (extractors.isEmpty()) {
>       System.out.print("\nValid Extractors: None.");
>     } else {
>       System.out.print("\nValid Extractors: " + extractors.size());
>       for (org.apache.any23.extractor.Extractor<?> extractor : extractors) {
>         extractor.getDescription().getExtractorName());
>          extractor.getDescription().getExtractorLabel()); 
> ...
> It will throw a NPE for ICBMExtractor.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)