On 09/14/2015 12:44 PM, Alan Bateman wrote:


On 14/09/2015 20:21, Stuart McCulloch wrote:
Yes, the issue is that ToolProvider.getSystemJavaCompiler() is returning null when using the Jigsaw EA with Maven.

AFAICT this is because it’s now using the service loader mechanism which is influenced by the Thread’s context ClassLoader


That may be a bug as I wouldn't expect the ToolProvider.getSystemXXX methods to locate the these tools via the TCCL.

I was talking with Jon about this. This is a bug in ToolProvider that it should call
   ServiceLoader.load(clazz, ClassLoader.getSystemClassLoader());

Looking at ToolProvider, the getSystemToolClassLoader method catches my attention that I think we should consider deprecating it since this assumes there is one class loader loading multiple tools.

Mandy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to