java - Netty logs now show "low-level API for accessing direct buffers reliably" -
why netty 4.0.15 4.0.19 seeing "your platform not provide complete low-level api accessing direct buffers reliably." in logs?
i'm not android platform , jre hasn't changed , i'm using osgi.
did change order wise how detect this?
platformdependent0 appears have changed how detects if sun.nio.ch.directbuffer available.
boolean directbufferfreeable = false; try { class<?> cls = class.forname("sun.nio.ch.directbuffer", false, getclassloader(platformdependent0.class)); method method = cls.getmethod("cleaner"); if ("sun.misc.cleaner".equals(method.getreturntype().getname())) { directbufferfreeable = true; } } catch (throwable t) { // don't have sun.nio.ch.directbuffer.cleaner(). } logger.debug("sun.nio.ch.directbuffer.cleaner(): {}", directbufferfreeable? "available" : "unavailable");
since osgi application needed add "sun.nio.ch" classloader. i'm using felix in case , added config following properties:
config.put(framework_systempackages_extra, "sun.misc,sun.nio.ch");
Comments
Post a Comment