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

Add ability for RPCs to be versioned/formatted #839

Merged
merged 9 commits into from
Aug 23, 2018

Conversation

joeygrover
Copy link
Member

@joeygrover joeygrover commented Aug 17, 2018

This PR is ready for review.

Risk

This PR makes minor API changes.

Summary

RPC Struct now has a format method that can be used to properly format RPCs based on the rpc spec version

CLA

This happens on marshalling and when the proxy base handles incomming messages. Subparams will be formated on retrieval when RPCs are retrieved due to them being stored as hashmaps instead of their actual RPC structs.
@joeygrover joeygrover changed the title [WIP] Add ability for RPCs to be versioned/formatted Add ability for RPCs to be versioned/formatted Aug 22, 2018
@codecov-io
Copy link

Codecov Report

Merging #839 into develop will increase coverage by 0.39%.
The diff coverage is 22.69%.

Impacted file tree graph

@@             Coverage Diff              @@
##             develop    #839      +/-   ##
============================================
+ Coverage      43.41%   43.8%   +0.39%     
- Complexity      3029    3038       +9     
============================================
  Files            382     383       +1     
  Lines          17461   17795     +334     
  Branches        1736    1750      +14     
============================================
+ Hits            7580    7795     +215     
- Misses          9563    9672     +109     
- Partials         318     328      +10
Impacted Files Coverage Δ Complexity Δ
...com/smartdevicelink/marshal/JsonRPCMarshaller.java 76.81% <ø> (ø) 15 <0> (ø) ⬇️
...smartdevicelink/streaming/StreamRPCPacketizer.java 7.54% <0%> (-0.79%) 0 <0> (-1)
...celink/proxy/rpc/RegisterAppInterfaceResponse.java 74.07% <0%> (-3.85%) 37 <0> (ø)
...om/smartdevicelink/transport/SdlRouterService.java 8.06% <0%> (-0.01%) 9 <0> (ø)
...n/java/com/smartdevicelink/proxy/SdlProxyBase.java 4.64% <1.26%> (-0.12%) 6 <1> (ø)
...rc/main/java/com/smartdevicelink/util/Version.java 82.14% <100%> (+3.88%) 7 <1> (+1) ⬆️
...a/com/smartdevicelink/proxy/rpc/SdlMsgVersion.java 80% <25%> (-20%) 9 <0> (ø)
.../smartdevicelink/streaming/AbstractPacketizer.java 67.39% <53.33%> (-26.55%) 0 <0> (-2)
...main/java/com/smartdevicelink/proxy/RPCStruct.java 71.62% <54.54%> (-4.65%) 41 <5> (+4)
...ava/com/smartdevicelink/proxy/rpc/OnHMIStatus.java 82.75% <66.66%> (-6.14%) 12 <2> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89bcf24...a9d4bd9. Read the comment docs.

this.rpcSpecVersion = rpcSpecVersion;
lFileSize = lLength;
iInitialCorrID = request.getCorrelationID();
mPauseLock = new Object();
Copy link
Contributor

Choose a reason for hiding this comment

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

formatting

formatRequested = true;
rpcSpecVersion = rpcVersion;
//Should override this method when breaking changes are made to the RPC spec
if(formatParams == true && store != null){
Copy link
Contributor

Choose a reason for hiding this comment

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

AS keeps suggesting simplifying the condition like this
if(formatParams && store != null)

@joeygrover joeygrover merged commit ae07b1a into develop Aug 23, 2018
@joeygrover joeygrover deleted the feature/rpc_versioning branch August 23, 2018 14:30
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