Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/com/parse4cn1/ParseUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,11 @@ public void logout() throws ParseException {
ParseCommand command = new ParsePostCommand(ENDPOINT_LOGOUT);
command.addHeader(ParseConstants.HEADER_SESSION_TOKEN, getSessionToken());
ParseResponse response = command.perform();
setSessionToken(null);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmedengu Why would it make more sense to reset the session and current user before checking whether the action succeeded. In my opinion the original implementation makes more sense i.e. resetting only after a successful deletion

current = null;
if (response.isFailed()) {
throw response.getException();
}
setSessionToken(null);
current = null;
}
}

Expand Down