Read inputstream once
@@ -80,7 +80,7 @@ public class ApplicationApiHandler extends SessionHandler {
byte[] params = parts.get(MULTIPART_PARAMS).getInputStream().readAllBytes();
log.log(Level.FINE, "Deploy parameters: [{}]", new String(params, StandardCharsets.UTF_8));
- prepareParams = PrepareParams.fromJson(parts.get(MULTIPART_PARAMS).getInputStream().readAllBytes(), tenantName, zookeeperBarrierTimeout);
+ prepareParams = PrepareParams.fromJson(params, tenantName, zookeeperBarrierTimeout);
Part appPackagePart = parts.get(MULTIPART_APPLICATION_PACKAGE);
compressedStream = createFromCompressedStream(appPackagePart.getInputStream(), appPackagePart.getContentType());
} catch (IOException e) {
