lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Wesemann (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (SOLR-2544) ThreadedContext throws NPE on getResolvedEntityAttribute()
Date Wed, 08 Jun 2011 22:13:59 GMT

    [ 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


Mime
View raw message