Skip to content

fix: Cast java.nio.ByteBuffer to support java6-8#804

Merged
JesusFreke merged 1 commit intoJesusFreke:masterfrom
iBotPeaches:jdk8-nio-fix
Mar 3, 2021
Merged

fix: Cast java.nio.ByteBuffer to support java6-8#804
JesusFreke merged 1 commit intoJesusFreke:masterfrom
iBotPeaches:jdk8-nio-fix

Conversation

@iBotPeaches
Copy link
Copy Markdown
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
Copy Markdown
Owner

Oh weird. Thanks for the PR!

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

I just released v2.5.1 with this fix :)

@JesusFreke
Copy link
Copy Markdown
Owner

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

@iBotPeaches
Copy link
Copy Markdown
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