r7262 - dumbhippo/trunk/server/src/com/dumbhippo/services
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7262 - dumbhippo/trunk/server/src/com/dumbhippo/services
- Date: Fri, 25 Jan 2008 15:49:34 -0600 (CST)
Author: marinaz
Date: 2008-01-25 15:49:33 -0600 (Fri, 25 Jan 2008)
New Revision: 7262
Modified:
dumbhippo/trunk/server/src/com/dumbhippo/services/FacebookPhotoData.java
Log:
Do not throw an exception when we are trying to get a photoId for an empty link
representing a no results marker. Return an empty String instead.
Modified: dumbhippo/trunk/server/src/com/dumbhippo/services/FacebookPhotoData.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/services/FacebookPhotoData.java 2008-01-25 21:49:05 UTC (rev 7261)
+++ dumbhippo/trunk/server/src/com/dumbhippo/services/FacebookPhotoData.java 2008-01-25 21:49:33 UTC (rev 7262)
@@ -88,9 +88,10 @@
}
static public String getPhotoIdFromLink(String link) {
- if (link == null)
- return null;
-
+ // link can be empty if we are getting a photoId for a no results marker
+ if (link == null || link.trim().length() == 0)
+ return link;
+
int startOfPid = link.indexOf("pid=");
if (startOfPid < 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]