r6950 - dumbhippo/trunk/server/src/com/dumbhippo/web/servlets
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r6950 - dumbhippo/trunk/server/src/com/dumbhippo/web/servlets
- Date: Mon, 3 Dec 2007 18:34:17 -0600 (CST)
Author: marinaz
Date: 2007-12-03 18:34:16 -0600 (Mon, 03 Dec 2007)
New Revision: 6950
Modified:
dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java
Log:
Fix NullPointerException that would happen if the user doesn't have information for a particular account.
Modified: dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java 2007-12-04 00:16:00 UTC (rev 6949)
+++ dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java 2007-12-04 00:34:16 UTC (rev 6950)
@@ -117,7 +117,7 @@
for (ExternalAccountView externalAccount : getSupportedAccounts(user)) {
xml.openElement("fb:editor-custom", "label", externalAccount.getSiteName());
- if (externalAccount.getExternalAccount().isLovedAndEnabled()) {
+ if (externalAccount.getExternalAccount() != null && externalAccount.getExternalAccount().isLovedAndEnabled()) {
xml.appendEmptyNode("input", "name", externalAccount.getDomNodeIdName(), "value", externalAccount.getExternalAccount().getAccountInfo());
} else {
xml.appendEmptyNode("input", "name", externalAccount.getDomNodeIdName());
@@ -127,13 +127,13 @@
if (externalAccount.isInfoTypeProvidedBySite()) {
xml.append("Enter your ");
xml.appendTextNode("a", externalAccount.getSiteName(),
- "href", externalAccount.getExternalAccount().getSiteLink(),
+ "href", externalAccount.getExternalAccountType().getSiteLink(),
"target", "_blank");
xml.append(" " + externalAccount.getSiteUserInfoType() + ".");
} else {
xml.append("Enter your " + externalAccount.getSiteUserInfoType() + " ");
xml.appendTextNode("a", externalAccount.getSiteName(),
- "href", externalAccount.getExternalAccount().getSiteLink(),
+ "href", externalAccount.getExternalAccountType().getSiteLink(),
"target", "_blank");
xml.append(" account.");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]