You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Frank Wesemann (JIRA)" <ji...@apache.org> on 2011/06/09 00:13:59 UTC

[jira] [Issue Comment Edited] (SOLR-2544) ThreadedContext throws NPE on getResolvedEntityAttribute()

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

Frank Wesemann edited comment on SOLR-2544 at 6/8/11 10:12 PM:
---------------------------------------------------------------

The patch solves the described problem by calling {{getVariableResolver().replaceTokens(entityRunner.entity.allAttributes.get(name))}} in ThreadedContext.

Added a JUnit TestCase.
Ceterum censeo that the DocBuilder / DataImporter thing should be refactored in a way that there are not so many inner Classes and internal dependencies.

      was (Author: wese):
    The patch solves the described problem by calling {{getVariableResolver().replaceTokens(entityRunner.entity.allAttributes.get(name))}} in ThreadedContext.

Add a JUnit TestCase.
Ceterum censeo that the DocBuilder / DataImporter thing should be refactored in a way that there a not so many inner Classes and internal dependencies.
  
> ThreadedContext throws NPE on getResolvedEntityAttribute()
> ----------------------------------------------------------
>
>                 Key: SOLR-2544
>                 URL: https://issues.apache.org/jira/browse/SOLR-2544
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 3.1
>         Environment: all
>            Reporter: Frank Wesemann
>         Attachments: SOLR-2544.patch, ThreadedContextTest.java
>
>
> ThreadedContext.getResolvedEntityAttribute() throws a NPE as it calls
> super.getResolvedEntityAttribute() which in turn calls its private member resolver, which is not set on a ThreadedContext.
> ContextImpl.getResolvedEntityAttribute() should call getVariableResover().replaceTokens(entity.allFields.get(name )).
> a testcase for this particular issue may be:
> assertEquals( context.getResolvedEntityAttribute(attrName), context.getVariableResolver().replaceTokens(entity.allFields.get(name ))

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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