On 05/01/2016 18:56, Lu, Yingqi wrote:
Hi Alan,

Sorry for the confusion. Let me be more detailed on the issue.

In previous version of the patch, I added an initializer in SocketImpl.java to 
load the libnet.so since the isReusePortAvailable and its native implementation 
were there. Then, this time, I tried to move isReusePortAvailable and its 
native implementation declaration down to AbstractPlainSocketImpl therefore I 
removed the initializer block from SocketImpl.java as well. Inside 
AbstractPlainSocketImpl.java, there is already an initializer there by default 
to load the libnet.so. I was assuming it would just load the library and the 
code would work. However, I found out the initializer inside the 
AbstractPlainSocketimpl does not execute. After I add back the initializer to 
SocketImpl, the code works.

My question is: Is this a reasonable approach to do it by keeping both 
initializers?

Thanks very much for your help,
Lucy

When you updated AbstractPlainSocketImpl then is the new initializer before or after the current initializer? They run in declaration order so I'm wondering if this is the issue you are running into.

-Alan

Reply via email to