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

Added crc to putfile #510

Merged
merged 9 commits into from Jun 28, 2018
Merged

Conversation

matwszedybyl
Copy link

added getting n setters in Putfile, applied setter in RPCRequestFactory and SDLProxyBase, CORRUPT_DATA to Result enum, added tests.

added getting n setters in Putfile, applied setter in RPCRequestFactory, CORRUPT_DATA to Result enum,  added tests.
Copy link
Contributor

@BrettyWhite BrettyWhite left a comment

Choose a reason for hiding this comment

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

just some formatting comments

@@ -1003,7 +1004,8 @@ private void sendOnSystemRequestToUrl(OnSystemRequest msg)
putFile.setCorrelationID(POLICIES_CORRELATION_ID);
putFile.setSdlFileName("response_data");
putFile.setFileData(response.toString().getBytes("UTF-8"));
updateBroadcastIntent(sendIntent, "DATA", "Data from cloud response: " + response.toString());
putFile.setCRC(response.toString().getBytes());
updateBroadcastIntent(sendIntent, "DATA", "Data from cloud response: " + response.toString());
Copy link
Contributor

Choose a reason for hiding this comment

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

these dont need to be tabbed

public static final String KEY_LENGTH = "length";

public static final String KEY_LENGTH = "length";
public static final String KEY_CRC = "crc";
Copy link
Contributor

Choose a reason for hiding this comment

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

no tabs

/**
* The data sent failed to pass CRC check in receiver end
*/
CORRUPTED_DATA;
Copy link
Contributor

Choose a reason for hiding this comment

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

no tab

public static final String KEY_LENGTH = "length";

public static final String KEY_LENGTH = "length";
public static final String KEY_CRC = "crc";
Copy link
Contributor

Choose a reason for hiding this comment

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

no tabs

@BrettyWhite
Copy link
Contributor

Do you need to also add the param for the other buildPutFile functions? here?

@@ -30,6 +30,7 @@ protected RPCMessage createMessage() {
msg.setSystemFile(Test.GENERAL_BOOLEAN);
msg.setOffset(Test.GENERAL_LONG);
msg.setLength(Test.GENERAL_LONG);
msg.setCRC(Test.GENERAL_LONG);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe another test where you use the setCRC(byte[] data) call?

@joeygrover joeygrover added this to Blocked in 4.4.0 May 18, 2017
@joeygrover joeygrover added this to Feature in 4.5.0 Jul 25, 2017
@joeygrover joeygrover removed this from Blocked in 4.4.0 Jul 25, 2017
@joeygrover joeygrover removed this from Feature in 4.5.0 Aug 1, 2017
@theresalech
Copy link
Contributor

Resolves #452

# Conflicts:
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ResultTests.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java
@codecov-io
Copy link

codecov-io commented May 22, 2018

Codecov Report

Merging #510 into develop will increase coverage by 0.02%.
The diff coverage is 77.27%.

Impacted file tree graph

@@             Coverage Diff              @@
##             develop    #510      +/-   ##
============================================
+ Coverage      42.38%   42.4%   +0.02%     
- Complexity      2794    2800       +6     
============================================
  Files            362     362              
  Lines          16862   16884      +22     
  Branches        1724    1727       +3     
============================================
+ Hits            7147    7160      +13     
- Misses          9403    9411       +8     
- Partials         312     313       +1
Impacted Files Coverage Δ Complexity Δ
...n/java/com/smartdevicelink/proxy/SdlProxyBase.java 4.74% <0%> (-0.01%) 6 <0> (ø)
...a/com/smartdevicelink/proxy/RPCRequestFactory.java 80.12% <100%> (+0.04%) 64 <0> (ø) ⬇️
...va/com/smartdevicelink/proxy/rpc/enums/Result.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...in/java/com/smartdevicelink/proxy/rpc/PutFile.java 75.64% <78.94%> (+1.06%) 29 <6> (+6) ⬆️
.../smartdevicelink/transport/MultiplexTransport.java 33.09% <0%> (-2.82%) 6% <0%> (ø)

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 9d7345d...8b604d3. Read the comment docs.

@BrettyWhite
Copy link
Contributor

@askirk @bilal-alsharifi @joeygrover

This is ready for re-review

@BrettyWhite
Copy link
Contributor

Tested working against Core PR

@joeygrover joeygrover merged commit 8b604d3 into develop Jun 28, 2018
@joeygrover joeygrover deleted the feature/issue_452_putfile_checksum branch June 28, 2018 14:37
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.

None yet

7 participants