lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <shalinman...@gmail.com>
Subject Re: DebugLogger oddity
Date Sun, 27 Sep 2009 06:28:51 GMT
On Sun, Sep 27, 2009 at 9:41 AM, Mark Miller <markrmiller@gmail.com> wrote:

> DebugLogger has the following code:
>
>    public DebugInfo(String name, int type, DebugInfo parent) {
>      this.name = name;
>      this.type = type;
>      this.parent = parent;
>      lst = new NamedList();
>      if (parent != null) {
>        String displayName = null;
>        if (type == SolrWriter.START_ENTITY) {
>          displayName = "entity:" + name;
>        } else if (type == SolrWriter.TRANSFORMED_ROW
>                || type == SolrWriter.TRANSFORMER_EXCEPTION) {
>          displayName = "transformer:" + name;
>        } else if (type == SolrWriter.START_DOC) {
>          name = displayName = "document#" + SolrWriter.getDocCount();
>        }
>        parent.lst.add(displayName, lst);
>      }
>    }
>
> That last assignment to name does nothing, so I'm guessing its meant to
> be this.name, or else it can be removed.
>
>
Yeah, that should've been this.name. The name is not used anywhere other
than the constructor so it can be made a local variable. However, I guess it
is there for future use.

-- 
Regards,
Shalin Shekhar Mangar.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message