You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Anthony Baker (JIRA)" <ji...@apache.org> on 2015/07/16 19:00:06 UTC
[jira] [Created] (GEODE-130) Suppress proprietary API compiler
warnings
Anthony Baker created GEODE-130:
-----------------------------------
Summary: Suppress proprietary API compiler warnings
Key: GEODE-130
URL: https://issues.apache.org/jira/browse/GEODE-130
Project: Geode
Issue Type: Bug
Reporter: Anthony Baker
Priority: Trivial
Geode uses several internal JDK classes like SignalHandler and Unsafe. These generate compiler warnings like:
{noformat}
/Users/abaker/code/incubator-geode/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/unsafe/GfshSignalHandler.java:73: warning: SignalHandler is internal proprietary API and may be removed in a future release
return (handler == SignalHandler.SIG_DFL || handler == SignalHandler.SIG_IGN ? null : handler);
{noformat}
It would be nice to suppress these using the {{-XDignore.symbol.file=true}} javac argument ([1|http://stackoverflow.com/questions/4065401/using-internal-sun-classes-with-javac]) to remove noise from the build output. Looks like the only way to do this is to fork the javac compiler from gradle ([2|https://discuss.gradle.org/t/passing-arguments-to-compiler-and-javadoc/1661]) and add a compiler arg:
{noformat}
options.fork = true
options.forkOptions.executable = 'javac'
options.compilerArgs << '-XDignore.symbol.file'
{noformat}
I'm not sure it's worth the performance hit of forking javac to suppress the warnings.
Of course, we will need to address usage of these API's in Java9 as we will not have access to internal JDK classes (due to Project Jigsaw).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)