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

Prepares for java 11. #180

Merged
merged 2 commits into from May 9, 2019

Conversation

Projects
None yet
3 participants
@damencho
Copy link
Member

commented Apr 26, 2019

No description provided.

@damencho damencho requested a review from bgrozev Apr 26, 2019

Method method;
try
{
method = SelChImpl.class.getMethod(

This comment has been minimized.

Copy link
@bgrozev

bgrozev May 9, 2019

Member

Do we want to the the method from SelChImpl, or from the class of our delegate? I.e. if the delegate overrides the method, which one should we call?

This comment has been minimized.

Copy link
@damencho

damencho May 9, 2019

Author Member

I need to test it, as there was some problem which I do not recall well when getting the class from the instance ...

This comment has been minimized.

Copy link
@damencho

damencho May 9, 2019

Author Member

It doesn't work obtaining the method from the instance with delegateAsSelChImpl.getClass().getMethod. The error:
java.lang.IllegalAccessException: class org.ice4j.socket.jdk8.DelegatingServerSocketChannel cannot access a member of class sun.nio.ch.ServerSocketChannelImpl (in module java.base) with modifiers "public"

With obtaining the method from the class it runs with one warning in the beginning:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.ice4j.socket.jdk8.DelegatingServerSocketChannel (file:/usr/share/jitsi-videobridge/lib/ice4j-2.0.0-SNAPSHOT.jar) to method sun.nio.ch.SelChImpl.translateInterestOps(int)
WARNING: Please consider reporting this to the maintainers of org.ice4j.socket.jdk8.DelegatingServerSocketChannel
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release


import org.ice4j.socket.*;

import org.ice4j.util.Logger;

This comment has been minimized.

Copy link
@bgrozev

bgrozev May 9, 2019

Member

Is this used anywhere? The classLogger is a java.util.logging.Logger instance

@bgrozev

bgrozev approved these changes May 9, 2019

@damencho damencho merged commit c7c4719 into master May 9, 2019

1 check passed

default 502 tests run, 370 skipped, 0 failed.
Details

@damencho damencho deleted the java11 branch May 9, 2019

method = null;

classLogger.log(
Level.SEVERE,

This comment has been minimized.

Copy link
@bkempe

bkempe May 15, 2019

This will log a SEVERE level message in either Java 8 or Java 11. Maybe it would be better to only log if neither method is found?

This comment has been minimized.

Copy link
@damencho

damencho May 15, 2019

Author Member

Yeah, you are right I saw it today ... maybe we will revert it cause it failed to work when only java11 is installed on the system, not sure why.
Testing before that with java8 and 11 installed and 11 to be default this was working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.