On 11 May 2011 17:08, Diego Peroni <diegoper...@vodafone.it> wrote:
> Hi,
>
> I've fixed a bug in org.apache.commons.feedparser.MetaFeedParser.java to
> allow correct date parsing in case of presence of white spaces before or
> after the date string.

Bugs should normally be reported via JIRA issues please.

http://commons.apache.org/dormant/feedparser/issue-tracking.html

This means they are less likely to be forgotten.

>       try {
>            //ok.  Support dc:date
>            //String v = state.current.getChildText( name, ns );
>            String v = state.current.getChild( name, ns ).getTextTrim(); //
> fix
>
>            if ( v != null ) {
>
>                Date d = null;
>                if ( ISO8601 ) {
>                    d = ISO8601DateParser.parse( v );
>                } else {
>                    d = RFC822DateParser.parse( v );
>                }
>
>                listener.onCreated( state, d );
>                listener.onCreatedEnd();
>
>                return true;
>            }
>        } catch ( Throwable t ) {
>            // ignore the exception, so we can just move on
>        }
>
>        return false;
>
>    }
>
>
> Best regards
> Diego Peroni
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to