[sip-comm-dev] patch for RSS favicon: file not found error


#1

Hello,

A little patch, that corrects the error when the favicon link points to a resource that does not exist: http 404 ERROR. This error can be produced by the http://ddj.com/rss/all.xml;jsessionid=OEVRSWPBVGBOQQSNDLRSKHSCJUNN2JVN RSS feeds (see SC log below).
The patch just creates a File with the url of the favicon and tests if this File really exists. If not, the function return the default RSS favicon.

Cheers,
Vincent

[java] 20:49:04.007 SEVERE: impl.protocol.rss.ContactRssImpl.getImage().294 I/O Error on favicon retrieval. java.io.FileNotFoundException: http://i.cmpnet.com/broken-image-request/ddj.com/favicon.ico
      [java] java.io.FileNotFoundException: http://i.cmpnet.com/broken-image-request/ddj.com/favicon.ico
      [java] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1168)
      [java] at java.net.URL.openStream(URL.java:1007)
      [java] at com.ctreber.aclib.image.ico.ICOFile.<init>(ICOFile.java:98)
      [java] at net.java.sip.communicator.impl.protocol.rss.ContactRssImpl.getImage(ContactRssImpl.java:244)
      [java] at net.java.sip.communicator.impl.gui.main.chat.ChatContact.getImage(ChatContact.java:180)
      [java] at net.java.sip.communicator.impl.gui.main.chat.ChatContactPanel$1.run(ChatContactPanel.java:137)
      [java] 20:49:04.007 FINER: impl.protocol.rss.ContactRssImpl.getDefaultRssIcon().309 Loading default icon at resources/images/rss/rss64x64.png
      [java] 20:49:04.007 FINER: impl.protocol.rss.ContactRssImpl.getDefaultRssIcon().322 Icon is 2926 bytes long

vincent_ContactRsImpl.java_2007-07-18.patch (1.17 KB)


#2

Hi Vincent,

I have tested your fix and it works for me now. I've just committed your patch.

Thanks!

Yana

Vincent Lucas wrote:

···

Hello,

A little patch, that corrects the error when the favicon link points to a resource that does not exist: http 404 ERROR. This error can be produced by the http://ddj.com/rss/all.xml;jsessionid=OEVRSWPBVGBOQQSNDLRSKHSCJUNN2JVN RSS feeds (see SC log below).
The patch just creates a File with the url of the favicon and tests if this File really exists. If not, the function return the default RSS favicon.

Cheers,
Vincent

[java] 20:49:04.007 SEVERE: impl.protocol.rss.ContactRssImpl.getImage().294 I/O Error on favicon retrieval. java.io.FileNotFoundException: http://i.cmpnet.com/broken-image-request/ddj.com/favicon.ico
     [java] java.io.FileNotFoundException: http://i.cmpnet.com/broken-image-request/ddj.com/favicon.ico
     [java] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1168)

     [java] at java.net.URL.openStream(URL.java:1007)
     [java] at com.ctreber.aclib.image.ico.ICOFile.<init>(ICOFile.java:98)
     [java] at net.java.sip.communicator.impl.protocol.rss.ContactRssImpl.getImage(ContactRssImpl.java:244)

     [java] at net.java.sip.communicator.impl.gui.main.chat.ChatContact.getImage(ChatContact.java:180)

     [java] at net.java.sip.communicator.impl.gui.main.chat.ChatContactPanel$1.run(ChatContactPanel.java:137)

     [java] 20:49:04.007 FINER: impl.protocol.rss.ContactRssImpl.getDefaultRssIcon().309 Loading default icon at resources/images/rss/rss64x64.png
     [java] 20:49:04.007 FINER: impl.protocol.rss.ContactRssImpl.getDefaultRssIcon().322 Icon is 2926 bytes long

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net