-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json RPC client-side to server-side port #3627
Conversation
this.jsonParser = jsonParser; | ||
|
||
this.jsonElementList = dtoObjectList.stream().map(Object::toString).map(jsonParser::parse).collect(Collectors.toList()); | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what?
*******************************************************************************/ | ||
package org.eclipse.che.api.core.jsonrpc; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
checkNotNull(message, "Message must not be null"); | ||
checkArgument(!message.isEmpty(), "Message must not be empty"); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
*******************************************************************************/ | ||
package org.eclipse.che.api.core.jsonrpc; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
checkNotNull(message, "Message must not be null"); | ||
checkArgument(!message.isEmpty(), "Message must not be empty"); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
JsonArray jsonArray = jsonParser.parse(message).getAsJsonArray(); | ||
this.jsonElementList = new ArrayList<>(jsonArray.size()); | ||
for (int i = 0; i < jsonArray.size(); i++) { | ||
jsonElementList.add(i, jsonArray.get(i)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use smth like jsonElementList.forEach(jsonArray::add)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent remark
*******************************************************************************/ | ||
package org.eclipse.che.api.core.jsonrpc; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
checkNotNull(message, "Message must not be null"); | ||
checkArgument(!message.isEmpty(), "Message must not be empty"); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
checkNotNull(method, "Method name must not be null"); | ||
checkArgument(!method.isEmpty(), "Method name must not be empty"); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
} | ||
|
||
if (id != null) { | ||
response.addProperty( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can be one line
*******************************************************************************/ | ||
package org.eclipse.che.api.core.jsonrpc; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
private final String method; | ||
private final Class<P> pClass; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
Build # 1530 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1530/ to view the results. |
Build # 1541 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1541/ to view the results. |
8fde381
to
cbe2594
Compare
Build # 1556 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1556/ to view the results. |
ci-build |
Build # 1562 - FAILED Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1562/ to view the results. |
Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>
Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>
Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>
Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>
cbe2594
to
2577e43
Compare
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/1919/ |
Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>
Port of #3143 to server-side
Changelog
Replicates changes done under issue #1947 and contained within PR #3032 including websocket and json rpc services modification but excluding exec agent client adaptation itself.