[ https://issues.apache.org/activemq/browse/CAMEL-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stan Lewis updated CAMEL-2214: ------------------------------ Attachment: patch.txt Patch that avoids the NPE > NPE thrown from RssDateComparator when using a feed that doesn't parse > properly. > -------------------------------------------------------------------------------- > > Key: CAMEL-2214 > URL: https://issues.apache.org/activemq/browse/CAMEL-2214 > Project: Apache Camel > Issue Type: Bug > Components: camel-rss > Affects Versions: 2.0.0 > Reporter: Stan Lewis > Assignee: Stan Lewis > Attachments: patch.txt > > > If a feed contains entries that don't have an updatedDate or publishDate and > you're using splitEntries=true + sortEntries=true you can run into this NPE: > {code} > 2009-11-23 14:31:50,152 [0: RssComponent] WARN > ultPollingConsumerPollStrategy - > Consumer > Consumer[rss://http://www.iafrica.com/pls/cms/grapevine.xml?consumer.initialDelay=9000&p_city=cape+town&p_section=weather&sortEntries=true&splitEntries=true] > > could not poll endpoint: > rss://http://www.iafrica.com/pls/cms/grapevine.xml?consumer.initialDelay=9000&p_city=cape+town&p_section=weather&sortEntries=true&splitEntries=true > > caused by: null > java.lang.NullPointerException > at > org.apache.camel.component.rss.RssDateComparator.compare(RssDateComparator.java:27) > at > org.apache.camel.component.rss.RssDateComparator.compare(RssDateComparator.java:24) > at java.util.Arrays.mergeSort(Arrays.java:1270) > at java.util.Arrays.mergeSort(Arrays.java:1281) > at java.util.Arrays.sort(Arrays.java:1210) > at java.util.Collections.sort(Collections.java:159) > at > org.apache.camel.component.rss.RssEntryPollingConsumer.sortEntries(RssEntryPollingConsumer.java:49) > at > org.apache.camel.component.rss.RssEntryPollingConsumer.populateList(RssEntryPollingConsumer.java:42) > at > org.apache.camel.component.feed.FeedEntryPollingConsumer.poll(FeedEntryPollingConsumer.java:43) > at > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) > at > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:637) > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.