Created
February 15, 2012 16:24
-
-
Save hkhan/1837038 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
JSONObject personData = db.getJSONObject(DATA_TABLE).getJSONObject(userId.getUserId(token)); > this should return null | |
if (personData == null) { | |
personData = new JSONObject(); | |
db.getJSONObject(DATA_TABLE).put(userId.getUserId(token), personData); | |
} | |
for (Map.Entry<String, String> entry : values.entrySet()) { | |
personData.put(entry.getKey(), entry.getValue()); | |
} | |
return ImmediateFuture.newInstance(null); | |
} catch (JSONException je) { | |
494: throw new ProtocolException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, je.getMessage(), | |
je); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment