-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace ConcurrentHashMap by Map (#43)
Use the Map interface instead of ConcurrentHashMap to let the developer choose what kind of Map to use.
- Loading branch information
Showing
198 changed files
with
934 additions
and
960 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
6 changes: 3 additions & 3 deletions
6
doc/1/controllers/auth/check-token/snippets/check-token-java.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>(); | ||
Map<String, Object> credentials = new HashMap<>(); | ||
credentials.put("username", "foo"); | ||
credentials.put("password", "bar"); | ||
|
||
ConcurrentHashMap<String, Object> response = | ||
Map<String, Object> response = | ||
kuzzle.getAuthController().login("local", credentials).get(); | ||
ConcurrentHashMap<String, Object> responseToken = | ||
Map<String, Object> responseToken = | ||
kuzzle.getAuthController().checkToken(response.get("jwt").toString()).get(); |
4 changes: 2 additions & 2 deletions
4
doc/1/controllers/auth/check-token/snippets/check-token-kotlin.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
val response = kuzzle.authController.login("local", ConcurrentHashMap<String, Any?>().apply { | ||
val response = kuzzle.authController.login("local", HashMap<String, Any?>().apply { | ||
put("username", "foo") | ||
put("password", "bar") | ||
}).get() | ||
|
||
val responseToken: ConcurrentHashMap<String, Any?> = | ||
val responseToken: Map<String, Any?> = | ||
kuzzle.authController.checkToken(response["jwt"].toString()).get() |
This file contains 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
6 changes: 3 additions & 3 deletions
6
doc/1/controllers/auth/create-my-credentials/snippets/create-my-credentials-java.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>(); | ||
Map<String, Object> credentials = new HashMap<>(); | ||
credentials.put("username", "foo"); | ||
credentials.put("password", "bar"); | ||
|
||
ConcurrentHashMap<String, Object> newCredentials = new ConcurrentHashMap<>(); | ||
Map<String, Object> newCredentials = new HashMap<>(); | ||
newCredentials.put("username", "foo2"); | ||
newCredentials.put("password", "bar2"); | ||
|
||
ConcurrentHashMap<String, Object> response = | ||
Map<String, Object> response = | ||
kuzzle.getAuthController().login("local", credentials).get(); | ||
kuzzle.getAuthController().createMyCredentials("other", newCredentials).get(); |
4 changes: 2 additions & 2 deletions
4
doc/1/controllers/auth/create-my-credentials/snippets/create-my-credentials-kotlin.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
kuzzle.authController.login("local", ConcurrentHashMap<String, Any?>().apply { | ||
kuzzle.authController.login("local", HashMap<String, Any?>().apply { | ||
put("username", "foo") | ||
put("password", "bar") | ||
}).get() | ||
|
||
kuzzle.authController.createMyCredentials("other", ConcurrentHashMap<String, Any?>().apply { | ||
kuzzle.authController.createMyCredentials("other", HashMap<String, Any?>().apply { | ||
put("username", "foo2") | ||
put("password", "bar2") | ||
}).get() |
2 changes: 1 addition & 1 deletion
2
doc/1/controllers/auth/credentials-exist/snippets/credentials-exist-java.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
doc/1/controllers/auth/credentials-exist/snippets/credentials-exist-kotlin.kt
This file contains 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
4 changes: 2 additions & 2 deletions
4
doc/1/controllers/auth/delete-my-credentials/snippets/delete-my-credentials-java.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>(); | ||
Map<String, Object> credentials = new HashMap<>(); | ||
credentials.put("username", "foo"); | ||
credentials.put("password", "bar"); | ||
|
||
ConcurrentHashMap<String, Object> response = kuzzle.getAuthController().login("local", credentials).get(); | ||
Map<String, Object> response = kuzzle.getAuthController().login("local", credentials).get(); | ||
kuzzle.getAuthController().deleteMyCredentials("local").get(); |
2 changes: 1 addition & 1 deletion
2
doc/1/controllers/auth/delete-my-credentials/snippets/delete-my-credentials-kotlin.kt
This file contains 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
This file contains 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
4 changes: 2 additions & 2 deletions
4
doc/1/controllers/auth/get-current-user/snippets/get-current-user-java.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ConcurrentHashMap<String, Object> credentials = new ConcurrentHashMap<>(); | ||
Map<String, Object> credentials = new HashMap<>(); | ||
credentials.put("username", "foo"); | ||
credentials.put("password", "bar"); | ||
|
||
kuzzle.getAuthController().login("local", credentials).get(); | ||
ConcurrentHashMap<String, Object> result = kuzzle.getAuthController().getCurrentUser().get(); | ||
Map<String, Object> result = kuzzle.getAuthController().getCurrentUser().get(); |
4 changes: 2 additions & 2 deletions
4
doc/1/controllers/auth/get-current-user/snippets/get-current-user-kotlin.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
kuzzle.authController.login("local", ConcurrentHashMap<String, Any?>().apply { | ||
kuzzle.authController.login("local", HashMap<String, Any?>().apply { | ||
put("username", "foo") | ||
put("password", "bar") | ||
}).get() | ||
|
||
val result: ConcurrentHashMap<String, Any?> = | ||
val result: Map<String, Any?> = | ||
kuzzle.authController.getCurrentUser().get() |
Oops, something went wrong.