[android] Fix java runner to not assume zip format when unzipping#112654
Merged
steveisok merged 3 commits intodotnet:mainfrom Feb 18, 2025
Merged
[android] Fix java runner to not assume zip format when unzipping#112654steveisok merged 3 commits intodotnet:mainfrom
steveisok merged 3 commits intodotnet:mainfrom
Conversation
After dotnet#112256 landed, there was a change to zip the test assets using `ZipFile.CreateFromDirectory` for cross platform support. This regressed `unzipAssets` in `MonoRunner.java` because it naivley assumed that directories would come before files in the zip archive. This change fixes the problem by making sure directories are created first before writing files to disk. Fixes dotnet#112558
Contributor
There was a problem hiding this comment.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/tasks/AndroidAppBuilder/Templates/MonoRunner.java:170
- The FileOutputStream should be closed in a finally block or using a try-with-resources statement to ensure it is always closed.
FileOutputStream fileOutputStream = new FileOutputStream(fullToPath);
Member
Author
|
/azp run runtime-android |
|
Azure Pipelines successfully started running 1 pipeline(s). |
akoeplinger
reviewed
Feb 18, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
Author
|
/azp run runtime-android |
|
Azure Pipelines successfully started running 1 pipeline(s). |
akoeplinger
approved these changes
Feb 18, 2025
This was referenced Feb 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #112256 landed, there was a change to zip the test assets using
ZipFile.CreateFromDirectoryfor cross platform support. This regressedunzipAssetsinMonoRunner.javabecause it naivley assumed that directories would come before files in the zip archive.This change fixes the problem by making sure directories are created first before writing files to disk.
Fixes #112558