Skip to content

Commit 05f1993

Browse files
committed
ignore any possible bug from jdk when trying to get compilation error diagnostic message
Signed-off-by: Olivier Lamy <[email protected]>
1 parent 95dc28a commit 05f1993

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompiler.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,10 @@ public CompilerResult compileInProcess( String[] args, final CompilerConfigurati
145145
{
146146
baseMessage = diagnostic.getMessage( Locale.getDefault() );
147147
}
148-
catch ( AssertionError e )
148+
catch ( Throwable e ) //ignore any possible error from jdk
149149
{
150150
// workaround for https://bugs.openjdk.java.net/browse/JDK-8210649
151+
// workaround for https://bugs.openjdk.java.net/browse/JDK-8216202
151152
getLogger().debug( "Ignore Issue get JavaCompiler Diagnostic message (see https://bugs.openjdk.java.net/browse/JDK-8210649):" + e.getMessage(), e );
152153
// in this case we try to replace the baseMessage with toString (hoping this does not throw a new exception..
153154
baseMessage = diagnostic.toString();

0 commit comments

Comments
 (0)