Skip to content
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

Merged
merged 4 commits into from
Feb 9, 2017
Merged

Conversation

dkuleshov
Copy link

@dkuleshov dkuleshov commented Jan 5, 2017

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.

this.jsonParser = jsonParser;

this.jsonElementList = dtoObjectList.stream().map(Object::toString).map(jsonParser::parse).collect(Collectors.toList());
;
Copy link
Contributor

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;


Copy link
Contributor

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");


Copy link
Contributor

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;


Copy link
Contributor

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");


Copy link
Contributor

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));
Copy link
Contributor

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)

Copy link
Author

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;


Copy link
Contributor

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");


Copy link
Contributor

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");


Copy link
Contributor

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(
Copy link
Contributor

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;


Copy link
Contributor

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;


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line

@codenvy-ci
Copy link

Build # 1530 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1530/ to view the results.

@codenvy-ci
Copy link

Build # 1541 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1541/ to view the results.

@codenvy-ci
Copy link

Build # 1556 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1556/ to view the results.

@vparfonov
Copy link
Contributor

ci-build

@codenvy-ci
Copy link

Build # 1562 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1562/ to view the results.

Dmitry Kuleshov added 4 commits February 9, 2017 12:21
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>
@codenvy-ci
Copy link

@vparfonov vparfonov merged commit 4af07f1 into master Feb 9, 2017
@vparfonov vparfonov deleted the json-rpc-wsagent-port branch February 9, 2017 20:37
@vparfonov vparfonov added this to the 5.3.0 milestone Feb 9, 2017
@JamesDrummond JamesDrummond mentioned this pull request Feb 17, 2017
9 tasks
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants