puniverse / quasar

Fibers, Channels and Actors for the JVM
http://docs.paralleluniverse.co/quasar/
Other
4.56k stars 575 forks source link

Fails to instrument java.io.InputStream.read(byte[],int,int) #333

Open abryantsev opened 4 years ago

abryantsev commented 4 years ago

Hi developers!

I have found a use case in my project for Quasar framework. Everything works as expected except that I need to extend java.io.InputStream.read(byte[],int,int). Whatever I have tried doesn't work. The only way to workaround the issue is to override the mentioned method in my extension by copy-pasting the original implementation. This looks a bit ugly. I attach a test project that demonstrate an issue.

I don't know whether the mentioned problem is a lack of functionality or I don't understand how to specify method to instrument in the suspendable-supers/suspendables.

Any help would be very appreciated. Thank you.

Quasar: 0.7.10

Test project FiberTest.zip (it is currently produces an exception. If commented out code is uncommented then there are no exceptions)

Execution log with exception.txt

Instrumentation debug log.zip

kimffy24 commented 4 years ago

java/io/BufferedInputStream#read is defined with an synchronized key word, which is an unsupported statement in quasar.