Skip to content

Commit a0bc43e

Browse files
committed
Merge pull request #124 from ParsePlatform/gogo.tidy-current-user
Consistent naming for CurrentUserController
2 parents 3fc9bf8 + 53bb001 commit a0bc43e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Parse/src/main/java/com/parse/CachedCurrentUserController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public String then(Task<ParseUser> task) throws Exception {
166166
}
167167

168168
@Override
169-
public Task<Void> logoutAsync() {
169+
public Task<Void> logOutAsync() {
170170
return taskQueue.enqueue(new Continuation<Void, Task<Void>>() {
171171
@Override
172172
public Task<Void> then(Task<Void> toAwait) throws Exception {

Parse/src/main/java/com/parse/ParseCurrentUserController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
extends ParseObjectCurrentController<ParseUser> {
1515

1616
/**
17-
* Get the persisted current ParseUser
17+
* Gets the persisted current ParseUser.
1818
* @param shouldAutoCreateUser
1919
* @return
2020
*/
@@ -28,14 +28,14 @@
2828
Task<Void> setIfNeededAsync(ParseUser user);
2929

3030
/**
31-
* Get the session token of the persisted current ParseUser
31+
* Gets the session token of the persisted current ParseUser.
3232
* @return
3333
*/
3434
Task<String> getCurrentSessionTokenAsync();
3535

3636
/**
37-
* Logout the current ParseUser
37+
* Logs out the current ParseUser.
3838
* @return
3939
*/
40-
Task<Void> logoutAsync();
40+
Task<Void> logOutAsync();
4141
}

Parse/src/main/java/com/parse/ParseUser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ private static Task<Void> saveCurrentUserAsync(ParseUser user) {
952952
* @return A Task that is resolved when logging out completes.
953953
*/
954954
public static Task<Void> logOutInBackground() {
955-
return getCurrentUserController().logoutAsync();
955+
return getCurrentUserController().logOutAsync();
956956
}
957957

958958
/**

Parse/src/test/java/com/parse/CachedCurrentUserControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public void testLogOutAsyncWithDeleteInDiskCurrentUserSuccess() throws Exception
295295
when(currentUser.logOutAsync()).thenReturn(Task.<Void>forResult(null));
296296
controller.currentUser = currentUser;
297297

298-
ParseTaskUtils.wait(controller.logoutAsync());
298+
ParseTaskUtils.wait(controller.logOutAsync());
299299

300300
// Make sure currentUser.logout() is called
301301
verify(currentUser, times(1)).logOutAsync();
@@ -316,7 +316,7 @@ public void testLogOutAsyncWithDeleteInDiskCurrentUserFailure() throws Exception
316316
CachedCurrentUserController controller =
317317
new CachedCurrentUserController(store);
318318

319-
ParseTaskUtils.wait(controller.logoutAsync());
319+
ParseTaskUtils.wait(controller.logOutAsync());
320320

321321
// Make sure controller state is correct
322322
assertNull(controller.currentUser);

0 commit comments

Comments
 (0)