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

fix: more than one Collector accept the jar file and want to read it's data #422

Closed
wants to merge 1 commit into from

Conversation

gentrio
Copy link

@gentrio gentrio commented Jun 27, 2023

No description provided.

@what-the-diff
Copy link

what-the-diff bot commented Jun 27, 2023

PR Summary

  • Improved efficiency in Collectors.kt file
    Modified the collect extension function for File to enable lazy loading of the entry data when collecting, resulting in better performance and efficiency.

@johnsonlee
Copy link
Collaborator

Could you explain more about this change?

@gentrio
Copy link
Author

gentrio commented Sep 4, 2023

Could you explain more about this change?

当 jar/aar 中的类命中多个Collector时,并且都需要在 collect 方法中读取类的 byteArray 来做操作时,就会导致流异常,因为在当此 map 中已经读取过一次流了

@johnsonlee
Copy link
Collaborator

Could you explain more about this change?

当 jar/aar 中的类命中多个Collector时,并且都需要在 collect 方法中读取类的 byteArray 来做操作时,就会导致流异常,因为在当此 map 中已经读取过一次流了

I see, if so, changing the CompositeCollector is a better option

@gentrio
Copy link
Author

gentrio commented Sep 4, 2023

Could you explain more about this change?

当 jar/aar 中的类命中多个Collector时,并且都需要在 collect 方法中读取类的 byteArray 来做操作时,就会导致流异常,因为在当此 map 中已经读取过一次流了

I see, if so, changing the CompositeCollector is a better option

我觉得都行,之所以选择改 Collectors,是因为 Directory 情况下没有问题,每次都是新建的 inputStream

johnsonlee added a commit to johnsonlee/booster that referenced this pull request Sep 4, 2023
johnsonlee added a commit to johnsonlee/booster that referenced this pull request Sep 4, 2023
@johnsonlee
Copy link
Collaborator

johnsonlee commented Sep 4, 2023

please try

johnsonlee added a commit to johnsonlee/booster that referenced this pull request Sep 4, 2023
johnsonlee added a commit to johnsonlee/booster that referenced this pull request Sep 4, 2023
@johnsonlee johnsonlee closed this Sep 25, 2023
@johnsonlee
Copy link
Collaborator

Fixed in the latest release:

Denjel pushed a commit to degoobackup/instabridge-booster that referenced this pull request Jan 26, 2024
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.

2 participants