Re: DocumentCache changes - missing return statement

Vadim Gritsenko <[email protected]>
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Natalia Shilenkova wrote:
> Vadim,
> 
> Looks like there was a missing return statement in this patch (code
> for stored instance of String):

Indeed! Thanks for spotting.

Vadim

>             return null;
>         } else if (v instanceof Document) {
>             return (Document) v;
> +        } else if (v instanceof String) {
> +            try {
> +                Document doc = DOMParser.toDocument((String) v);
> +                ((DBDocument) doc).setSource(new NodeSource(col, key));
> +            } catch (Exception e) {
> +                if (log.isWarnEnabled()) {
> +                    log.warn("ignored exception", e);
> +                }
> +            }
>         } else if (v instanceof byte[]) {
>             try {
>                 SymbolTable s = col.getSymbols();
> 
> Regards,
> Natalia
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.