Skip to content

Commit

Permalink
ignore any possible bug from jdk when trying to get compilation error…
Browse files Browse the repository at this point in the history
… diagnostic message

Signed-off-by: Olivier Lamy <[email protected]>
  • Loading branch information
olamy committed Mar 16, 2022
1 parent 9c6c1a1 commit 31b16c0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ public CompilerResult compileInProcess( String[] args, final CompilerConfigurati
{
baseMessage = diagnostic.getMessage( Locale.getDefault() );
}
catch ( AssertionError e )
catch ( Throwable e ) //ignore any possible error from jdk
{
// workaround for https://bugs.openjdk.java.net/browse/JDK-8210649
// workaround for https://bugs.openjdk.java.net/browse/JDK-8216202
getLogger().debug( "Ignore Issue get JavaCompiler Diagnostic message (see https://bugs.openjdk.java.net/browse/JDK-8210649):" + e.getMessage(), e );
// in this case we try to replace the baseMessage with toString (hoping this does not throw a new exception..
baseMessage = diagnostic.toString();
Expand Down

0 comments on commit 31b16c0

Please sign in to comment.