Author: doll
Date: Mon May  5 04:28:37 2008
New Revision: 653428

URL: http://svn.apache.org/viewvc?rev=653428&view=rev
Log:
Fixed a bug where shindig was rejecting all fetch people calls that used an 
array of user ids.


Modified:
    
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java
    
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/IdSpec.java

Modified: 
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java?rev=653428&r1=653427&r2=653428&view=diff
==============================================================================
--- 
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java
 (original)
+++ 
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/OpenSocialDataHandler.java
 Mon May  5 04:28:37 2008
@@ -24,6 +24,7 @@
 import org.apache.shindig.social.opensocial.model.Activity;
 import org.apache.shindig.social.opensocial.model.IdSpec;
 
+import com.google.inject.Inject;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
@@ -35,8 +36,6 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import com.google.inject.Inject;
-
 /**
  * Servlet for serving the data required for opensocial.
  * This will expand to be more sophisticated as time goes on.
@@ -152,10 +151,6 @@
     } catch (JSONException e) {
       logger.log(Level.INFO, e.getMessage());
       response = new ResponseItem<Object>(ResponseError.BAD_REQUEST,
-          "The json request had a bad format", new JSONObject());
-    } catch (IllegalArgumentException e) {
-      logger.log(Level.INFO, e.getMessage());
-      response = new ResponseItem<Object>(ResponseError.BAD_REQUEST,
           "The json request had a bad idSpec", new JSONObject());
     }
 

Modified: 
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/IdSpec.java
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/IdSpec.java?rev=653428&r1=653427&r2=653428&view=diff
==============================================================================
--- 
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/IdSpec.java
 (original)
+++ 
incubator/shindig/trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/IdSpec.java
 Mon May  5 04:28:37 2008
@@ -37,10 +37,11 @@
   }
 
 
-  public static IdSpec fromJson(String jsonIdSpec)
-      throws IllegalArgumentException {
-    Type idSpecEnum = Type.valueOf(jsonIdSpec);
-    if (idSpecEnum == null) {
+  public static IdSpec fromJson(String jsonIdSpec) {
+    Type idSpecEnum;
+    try {
+      idSpecEnum = Type.valueOf(jsonIdSpec);
+    } catch (IllegalArgumentException e) {
       idSpecEnum = Type.USER_IDS;
     }
 


Reply via email to