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: Cast java.nio.ByteBuffer to support java6-8 #804

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

iBotPeaches
Copy link
Contributor

@iBotPeaches iBotPeaches commented Mar 3, 2021

I was having build issues with Apktool, this resolves it. Strangely, I can build smali without this either way without an issue. So its very possible this is entirely my fault somehow.

Though, I found this https://jira.mongodb.org/browse/JAVA-2559 & mongodb/mongo-java-driver@21c91bd

So I feel less crazy.

Checked entire project.

➜  smali git:(master) ✗ grep -r '.position();' * 
➜  smali git:(master) ✗ grep -r '.limit();' *   
➜  smali git:(master) ✗ grep -r '.flip();' *    
➜  smali git:(master) ✗ grep -r '.clear();' *   
dexlib2/src/main/java/org/jf/dexlib2/writer/io/MemoryDeferredOutputStream.java:        buffers.clear();
dexlib2/src/main/java/org/jf/dexlib2/writer/DexWriter.java:            tempBuffer.clear();
➜  smali git:(master) ✗ 

Only 1 ByteBuffer affected method used.

 - affected methods
 -- position
 -- limit
 -- flip
 -- clear
@JesusFreke
Copy link
Owner

Oh weird. Thanks for the PR!

@JesusFreke JesusFreke merged commit e4746fb into JesusFreke:master Mar 3, 2021
@JesusFreke
Copy link
Owner

I just released v2.5.1 with this fix :)

@JesusFreke
Copy link
Owner

Also, I confirmed that I was able to get the same error when running smali on a java 8 jdk

@iBotPeaches
Copy link
Contributor Author

thanks for quick turn around!

@iBotPeaches iBotPeaches deleted the jdk8-nio-fix branch March 3, 2021 01:15
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