mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Update method :: updateRepoSettings to create NotebookRepoSettingsRequest with Empty static object instead of null
This commit is contained in:
parent
a4d9749294
commit
f7c7bf235d
1 changed files with 2 additions and 2 deletions
|
|
@ -90,7 +90,7 @@ public class NotebookRepoRestApi {
|
|||
return new JsonResponse<>(Status.NOT_FOUND, "", Collections.emptyMap()).build();
|
||||
}
|
||||
AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal());
|
||||
NotebookRepoSettingsRequest newSettings = null;
|
||||
NotebookRepoSettingsRequest newSettings = NotebookRepoSettingsRequest.EMPTY;
|
||||
try {
|
||||
newSettings = gson.fromJson(payload, NotebookRepoSettingsRequest.class);
|
||||
} catch (JsonSyntaxException e) {
|
||||
|
|
@ -99,7 +99,7 @@ public class NotebookRepoRestApi {
|
|||
ImmutableMap.of("error", "Invalid payload structure")).build();
|
||||
}
|
||||
|
||||
if (newSettings == null) {
|
||||
if (NotebookRepoSettingsRequest.isEmpty(newSettings)) {
|
||||
LOG.error("Invalid property");
|
||||
return new JsonResponse<>(Status.NOT_ACCEPTABLE, "",
|
||||
ImmutableMap.of("error", "Invalid payload")).build();
|
||||
|
|
|
|||
Loading…
Reference in a new issue